Skip to content

Commit

Permalink
laravel 8 support
Browse files Browse the repository at this point in the history
  • Loading branch information
dipeshsukhia committed Apr 25, 2021
1 parent 2dc3290 commit d77d9e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/LaravelCountryStateCityDataServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ public function boot()
/* seeders */
if(is_dir(database_path('seeds'))){
$seedDir = database_path('seeds');
$seederNameSpace = "Seeder";
$seederNameSpace = "";
}else{
$seedDir = database_path('seeders');
$seederNameSpace = "Seeders";
$seederNameSpace = "namespace Database\\Seeders";
}
$seederTemplate = self::getStubContents('CountryStateCityTableSeeder.stub');
$seederTemplate = str_replace('{{seederNameSpace}}', $seederNameSpace, $seederTemplate);
Expand Down
2 changes: 1 addition & 1 deletion src/resources/stubs/CountryStateCityTableSeeder.stub
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Database\{{seederNameSpace}};
{{seederNameSpace}};

use Illuminate\Database\Seeder;
use App{{modelNameSpace}}\Country;
Expand Down

0 comments on commit d77d9e7

Please sign in to comment.