اذهب إلى المحتوى

Hussein Kourani

الأعضاء
  • المساهمات

    20
  • تاريخ الانضمام

  • تاريخ آخر زيارة

إنجازات Hussein Kourani

عضو مساهم

عضو مساهم (2/3)

18

السمعة بالموقع

  1. Illuminate\Database\QueryException SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'posts' already exists (Connection: mysql, SQL: create table `posts` (`id` bigint unsigned not null auto_increment primary key, `created_at` timestamp null, `updated_at` timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci') at vendor\laravel\framework\src\Illuminate\Database\Connection.php:793 789▕ // If an exception occurs when attempting to run a query, we'll format the error 790▕ // message to include the bindings with SQL, which will make this exception a 791▕ // lot more helpful to the developer instead of just the database's errors. 792▕ catch (Exception $e) { ➜ 793▕ throw new QueryException( 794▕ $this->getName(), $query, $this->prepareBindings($bindings), $e 795▕ ); 796▕ } 1 vendor\laravel\framework\src\Illuminate\Database\Connection.php:578 PDOException::("SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'posts' already exists") 2 vendor\laravel\framework\src\Illuminate\Database\Connection.php:578 PDOStatement::execute()
  2. Route::get('show/{$id}' , function($id) { $post = DB::table('posts')->find($id); return view('posts.show' , compact('post')); }); file index <?php foreach($posts as $post) : ?> <a class="btn btn-outline-danger" href="/show/<?php echo($post->id) ?> "> {{$post->title}} </a> <?php echo($post->body) ?> <?php echo(Carbon\Carbon::parse($post->created_at)->diffForHumans())?> <br> <?php endforeach ?> what is the problem i can access show in link browser but it always gives me 404 error not found
  3. SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'posts' already exists (Connection: mysql, SQL: create table `posts` (`id` bigint unsigned not null auto_increment primary key, `created_at` timestamp null, `updated_at` timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci') this error appears when I try to migrate database from add_published_and_likes.php
×
×
  • أضف...