diff --git a/app/Helpers/Global/geo_helper.php b/app/Helpers/Global/geo_helper.php index e78c716..b26f4fb 100644 --- a/app/Helpers/Global/geo_helper.php +++ b/app/Helpers/Global/geo_helper.php @@ -43,4 +43,4 @@ function get_current_ip() return $ip_add_set[0]; } -} \ No newline at end of file +} diff --git a/app/Helpers/Global/helpers.php b/app/Helpers/Global/helpers.php index 7c9fe86..2fb05db 100644 --- a/app/Helpers/Global/helpers.php +++ b/app/Helpers/Global/helpers.php @@ -1,5 +1,4 @@ route('home.country', ['country' => 'my']); + return redirect()->route('home.country', ['country' => 'my']); } public function country(Request $request, $country) { - $country = CountryLocale::where('slug', $country)->first(); + $country = CountryLocale::where('slug', $country)->first(); - if (!is_null($country)) - { - $categories = Category::where('country_locale_id', $country->id)->get(); + if (! is_null($country)) { + $categories = Category::where('country_locale_id', $country->id)->get(); - return view('front.country', ['categories' => $categories, 'country' => $country]); - } + return view('front.country', ['categories' => $categories, 'country' => $country]); + } - return redirect()->route('home.country', ['country' => 'my']); + return redirect()->route('home.country', ['country' => 'my']); } } diff --git a/app/Http/Requests/ProfileUpdateRequest.php b/app/Http/Requests/ProfileUpdateRequest.php index 52a7583..ec2dc83 100644 --- a/app/Http/Requests/ProfileUpdateRequest.php +++ b/app/Http/Requests/ProfileUpdateRequest.php @@ -2,9 +2,9 @@ namespace App\Http\Requests; -use Illuminate\Validation\Rule; -use Illuminate\Support\Facades\Auth; use Illuminate\Foundation\Http\FormRequest; +use Illuminate\Support\Facades\Auth; +use Illuminate\Validation\Rule; class ProfileUpdateRequest extends FormRequest { @@ -28,4 +28,4 @@ protected function prepareForValidation() $this->request->remove('password'); } } -} \ No newline at end of file +} diff --git a/app/Models/Category.php b/app/Models/Category.php index ccb145b..3202dc6 100644 --- a/app/Models/Category.php +++ b/app/Models/Category.php @@ -12,7 +12,7 @@ /** * Class Category - * + * * @property int $id * @property int $country_locale_id * @property string|null $name @@ -26,39 +26,37 @@ * @property string|null $deleted_at * @property Carbon|null $created_at * @property Carbon|null $updated_at - * * @property CountryLocale $country_locale - * - * @package App\Models */ class Category extends Model { - use SoftDeletes; - protected $table = 'categories'; + use SoftDeletes; - protected $casts = [ - 'country_locale_id' => 'int', - 'enabled' => 'bool', - 'is_top' => 'bool', - '_lft' => 'int', - '_rgt' => 'int', - 'parent_id' => 'int' - ]; + protected $table = 'categories'; - protected $fillable = [ - 'country_locale_id', - 'name', - 'short_name', - 'slug', - 'enabled', - 'is_top', - '_lft', - '_rgt', - 'parent_id' - ]; + protected $casts = [ + 'country_locale_id' => 'int', + 'enabled' => 'bool', + 'is_top' => 'bool', + '_lft' => 'int', + '_rgt' => 'int', + 'parent_id' => 'int', + ]; - public function country_locale() - { - return $this->belongsTo(CountryLocale::class); - } + protected $fillable = [ + 'country_locale_id', + 'name', + 'short_name', + 'slug', + 'enabled', + 'is_top', + '_lft', + '_rgt', + 'parent_id', + ]; + + public function country_locale() + { + return $this->belongsTo(CountryLocale::class); + } } diff --git a/app/Models/CountryLocale.php b/app/Models/CountryLocale.php index b6858ea..cb71a0d 100644 --- a/app/Models/CountryLocale.php +++ b/app/Models/CountryLocale.php @@ -12,7 +12,7 @@ /** * Class CountryLocale - * + * * @property int $id * @property string $name * @property string $slug @@ -21,22 +21,21 @@ * @property string|null $deleted_at * @property Carbon|null $created_at * @property Carbon|null $updated_at - * - * @package App\Models */ class CountryLocale extends Model { - use SoftDeletes; - protected $table = 'country_locales'; + use SoftDeletes; - protected $casts = [ - 'enabled' => 'bool' - ]; + protected $table = 'country_locales'; - protected $fillable = [ - 'name', - 'slug', - 'i18n', - 'enabled' - ]; + protected $casts = [ + 'enabled' => 'bool', + ]; + + protected $fillable = [ + 'name', + 'slug', + 'i18n', + 'enabled', + ]; } diff --git a/composer.json b/composer.json index 6cef695..6f51339 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ }, "require-dev": { "fakerphp/faker": "^1.9.1", - "laravel/pint": "^1.0", + "laravel/pint": "^1.10", "laravel/sail": "^1.18", "laraveldaily/larastarters": "^2.3", "mockery/mockery": "^1.4.4", diff --git a/composer.lock b/composer.lock index 08902a7..542e062 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "7c7dee8e0b413eb119aa5455e2d5a6ce", + "content-hash": "d4622e7e11ee1dc87e72a4ec06a255f9", "packages": [ { "name": "artesaos/seotools", diff --git a/config/models.php b/config/models.php index 9eb43c1..8226064 100644 --- a/config/models.php +++ b/config/models.php @@ -416,7 +416,7 @@ |-------------------------------------------------------------------------- | Move $fillable property to base files |-------------------------------------------------------------------------- - | When base_files is true you can set fillable_in_base_files to true + | When base_files is true you can set fillable_in_base_files to true | if you want the $fillable to be generated in base files | */ @@ -489,18 +489,18 @@ | */ -// 'connections' => [ -// 'read_only_external' => [ -// 'parent' => \App\Models\ReadOnlyModel::class, -// 'connection' => true, -// 'users' => [ -// 'connection' => false, -// ], -// 'my_other_database' => [ -// 'password_resets' => [ -// 'connection' => false, -// ] -// ] -// ], -// ], + // 'connections' => [ + // 'read_only_external' => [ + // 'parent' => \App\Models\ReadOnlyModel::class, + // 'connection' => true, + // 'users' => [ + // 'connection' => false, + // ], + // 'my_other_database' => [ + // 'password_resets' => [ + // 'connection' => false, + // ] + // ] + // ], + // ], ]; diff --git a/config/platform/general.php b/config/platform/general.php index cf2a6b8..b908656 100644 --- a/config/platform/general.php +++ b/config/platform/general.php @@ -1,7 +1,7 @@ '1.0.0', - - 'dev_default_ip' => env('DEV_DEFAULT_IP','127.0.0.1'), -]; \ No newline at end of file + 'app_version' => '1.0.0', + + 'dev_default_ip' => env('DEV_DEFAULT_IP', '127.0.0.1'), +]; diff --git a/config/seotools.php b/config/seotools.php index 5c52398..bde1e32 100644 --- a/config/seotools.php +++ b/config/seotools.php @@ -8,25 +8,25 @@ /* * The default configurations to be used by the meta generator. */ - 'defaults' => [ - 'title' => "It's Over 9000!", // set false to total remove - 'titleBefore' => false, // Put defaults.title before page title, like 'It's Over 9000! - Dashboard' - 'description' => 'For those who helped create the Genki Dama', // set false to total remove - 'separator' => ' - ', - 'keywords' => [], - 'canonical' => false, // Set to null or 'full' to use Url::full(), set to 'current' to use Url::current(), set false to total remove - 'robots' => false, // Set to 'all', 'none' or any combination of index/noindex and follow/nofollow + 'defaults' => [ + 'title' => "It's Over 9000!", // set false to total remove + 'titleBefore' => false, // Put defaults.title before page title, like 'It's Over 9000! - Dashboard' + 'description' => 'For those who helped create the Genki Dama', // set false to total remove + 'separator' => ' - ', + 'keywords' => [], + 'canonical' => false, // Set to null or 'full' to use Url::full(), set to 'current' to use Url::current(), set false to total remove + 'robots' => false, // Set to 'all', 'none' or any combination of index/noindex and follow/nofollow ], /* * Webmaster tags are always added. */ 'webmaster_tags' => [ - 'google' => null, - 'bing' => null, - 'alexa' => null, + 'google' => null, + 'bing' => null, + 'alexa' => null, 'pinterest' => null, - 'yandex' => null, - 'norton' => null, + 'yandex' => null, + 'norton' => null, ], 'add_notranslate_class' => false, @@ -36,12 +36,12 @@ * The default configurations to be used by the opengraph generator. */ 'defaults' => [ - 'title' => 'Over 9000 Thousand!', // set false to total remove + 'title' => 'Over 9000 Thousand!', // set false to total remove 'description' => 'For those who helped create the Genki Dama', // set false to total remove - 'url' => false, // Set null for using Url::current(), set false to total remove - 'type' => false, - 'site_name' => false, - 'images' => [], + 'url' => false, // Set null for using Url::current(), set false to total remove + 'type' => false, + 'site_name' => false, + 'images' => [], ], ], 'twitter' => [ @@ -58,11 +58,11 @@ * The default configurations to be used by the json-ld generator. */ 'defaults' => [ - 'title' => 'Over 9000 Thousand!', // set false to total remove + 'title' => 'Over 9000 Thousand!', // set false to total remove 'description' => 'For those who helped create the Genki Dama', // set false to total remove - 'url' => false, // Set to null or 'full' to use Url::full(), set to 'current' to use Url::current(), set false to total remove - 'type' => 'WebPage', - 'images' => [], + 'url' => false, // Set to null or 'full' to use Url::full(), set to 'current' to use Url::current(), set false to total remove + 'type' => 'WebPage', + 'images' => [], ], ], ]; diff --git a/database/migrations/2023_07_24_154301_create_categories_table.php b/database/migrations/2023_07_24_154301_create_categories_table.php index 9aa20d4..026c0a0 100644 --- a/database/migrations/2023_07_24_154301_create_categories_table.php +++ b/database/migrations/2023_07_24_154301_create_categories_table.php @@ -1,11 +1,10 @@