moktar
10/23/2018 - 4:53 PM

sqlite dont support ondelete('cascade'), faield tdd beccause sharing data via view composers solutions

################################################################################################

sqlite dont support ondelete('cascade')... 

  if(config('database.default') == 'sqlite'){
      $db = app()->make('db');
      $db->connection()->getPdo()->exec("pragma foreign_keys=1");
  }
################################################################################################

faield tdd because sharing data via view composers solutions 

    if (! $this->app->runningInConsole()) {
       \View::share('categories',Category::all());
       \View::share('tags',Tag::all());
    }
################################################################################################
    
if you had faced this 2 errors (they are suparete errors) just add this code to appservice providers in boot function