Файловый менеджер - Редактировать - /home/c7lekhnath/silverray.com.au/Modules/Language/database/seeders/68334/Location.tar
Назад
lang/.gitkeep 0000644 00000000000 15012226772 0007110 0 ustar 00 module.json 0000644 00000000342 15012226772 0006727 0 ustar 00 { "name": "Location", "alias": "location", "description": "", "keywords": [], "priority": 0, "providers": [ "Modules\\Location\\app\\Providers\\LocationServiceProvider" ], "files": [] } tests/Unit/.gitkeep 0000644 00000000000 15012226772 0010250 0 ustar 00 tests/Feature/.gitkeep 0000644 00000000000 15012226772 0010724 0 ustar 00 vite.config.js 0000644 00000001306 15012226772 0007321 0 ustar 00 import { defineConfig } from 'vite'; import laravel from 'laravel-vite-plugin'; export default defineConfig({ build: { outDir: '../../public/build-location', emptyOutDir: true, manifest: true, }, plugins: [ laravel({ publicDirectory: '../../public', buildDirectory: 'build-location', input: [ __dirname + '/resources/assets/sass/app.scss', __dirname + '/resources/assets/js/app.js' ], refresh: true, }), ], }); //export const paths = [ // 'Modules/$STUDLY_NAME$/resources/assets/sass/app.scss', // 'Modules/$STUDLY_NAME$/resources/assets/js/app.js', //]; routes/.gitkeep 0000644 00000000000 15012226772 0007510 0 ustar 00 routes/error_log 0000644 00000001110 15012226772 0007777 0 ustar 00 [07-May-2025 16:44:39 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Support\Facades\Route" not found in /home/lekhnath/silverray.com.au/Modules/Location/routes/api.php:17 Stack trace: #0 {main} thrown in /home/lekhnath/silverray.com.au/Modules/Location/routes/api.php on line 17 [07-May-2025 20:15:16 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Support\Facades\Route" not found in /home/lekhnath/silverray.com.au/Modules/Location/routes/web.php:20 Stack trace: #0 {main} thrown in /home/lekhnath/silverray.com.au/Modules/Location/routes/web.php on line 20 routes/web.php 0000644 00000002717 15012226772 0007366 0 ustar 00 <?php use Illuminate\Support\Facades\Route; use Modules\Location\app\Http\Controllers\CityController; use Modules\Location\app\Http\Controllers\CountryController; use Modules\Location\app\Http\Controllers\LocationController; use Modules\Location\app\Http\Controllers\CountryStateController; /* |-------------------------------------------------------------------------- | Web Routes |-------------------------------------------------------------------------- | | Here is where you can register web routes for your application. These | routes are loaded by the RouteServiceProvider within a group which | contains the "web" middleware group. Now create something great! | */ Route::middleware(['auth:admin', 'translation']) ->name('admin.') ->prefix('admin') ->group(function () { Route::resource('country', CountryController::class)->names('country')->except('show'); Route::put('/country/status-update/{id}', [CountryController::class, 'statusUpdate'])->name('country.status-update'); Route::resource('country-state', CountryStateController::class)->names('country-state')->except('show'); Route::put('/country-state/status-update/{id}', [CountryStateController::class, 'statusUpdate'])->name('country-state.status-update'); Route::resource('city', CityController::class)->names('city')->except('show'); Route::put('/city/status-update/{id}', [CityController::class, 'statusUpdate'])->name('city.status-update'); }); routes/api.php 0000644 00000001235 15012226772 0007354 0 ustar 00 <?php use Illuminate\Http\Request; use Illuminate\Support\Facades\Route; /* |-------------------------------------------------------------------------- | API Routes |-------------------------------------------------------------------------- | | Here is where you can register API routes for your application. These | routes are loaded by the RouteServiceProvider within a group which | is assigned the "api" middleware group. Enjoy building your API! | */ Route::middleware(['auth:sanctum'])->prefix('v1')->name('api.')->group(function () { Route::get('location', fn (Request $request) => $request->user())->name('location'); }); composer.json 0000644 00000001303 15012226772 0007267 0 ustar 00 { "name": "nwidart/location", "description": "", "authors": [ { "name": "Nicolas Widart", "email": "n.widart@gmail.com" } ], "extra": { "laravel": { "providers": [], "aliases": { } } }, "autoload": { "psr-4": { "Modules\\Location\\": "", "Modules\\Location\\App\\": "app/", "Modules\\Location\\Database\\Factories\\": "database/factories/", "Modules\\Location\\Database\\Seeders\\": "database/seeders/" } }, "autoload-dev": { "psr-4": { "Modules\\Location\\Tests\\": "tests/" } } } config/config.php 0000644 00000000055 15012226772 0007773 0 ustar 00 <?php return [ 'name' => 'Location', ]; config/.gitkeep 0000644 00000000000 15012226773 0007435 0 ustar 00 package.json 0000644 00000000410 15012226773 0007032 0 ustar 00 { "private": true, "type": "module", "scripts": { "dev": "vite", "build": "vite build" }, "devDependencies": { "axios": "^1.1.2", "laravel-vite-plugin": "^0.7.5", "sass": "^1.69.5", "postcss": "^8.3.7", "vite": "^4.0.0" } } app/Http/Controllers/LocationController.php 0000644 00000000667 15012226773 0015114 0 ustar 00 <?php namespace Modules\Location\app\Http\Controllers; use Str; use App\Enums\RedirectType; use Illuminate\Http\Request; use Illuminate\Http\Response; use App\Traits\RedirectHelperTrait; use App\Http\Controllers\Controller; use Illuminate\Pagination\Paginator; use Illuminate\Http\RedirectResponse; use Modules\Location\app\Models\City; use Modules\Location\app\Models\CountryState; class LocationController extends Controller { } app/Http/Controllers/CountryStateController.php 0000644 00000012512 15012226773 0016000 0 ustar 00 <?php namespace Modules\Location\app\Http\Controllers; use Str; use App\Enums\RedirectType; use Illuminate\Http\Request; use Illuminate\Http\Response; use App\Traits\RedirectHelperTrait; use App\Http\Controllers\Controller; use Illuminate\Pagination\Paginator; use Illuminate\Http\RedirectResponse; use Modules\Location\app\Models\Country; use Modules\Location\app\Models\CountryState; class CountryStateController extends Controller { use RedirectHelperTrait; /** * Display a listing of the resource. */ public function index(Request $request) { checkAdminHasPermissionAndThrowException('state.view'); $query = CountryState::query(); $query->when($request->filled('keyword'), function ($qa) use ($request) { $qa->where('title', 'like', '%'.$request->keyword.'%'); }); $query->when($request->filled('status'), function ($q) use ($request) { $q->where('status', $request->status); }); $orderBy = $request->filled( 'order_by' ) && $request->order_by == 1 ? 'asc' : 'desc'; if ($request->filled('par-page')) { $countryStates = $request->get('par-page') == 'all' ? $query->orderBy( 'id', $orderBy )->get() : $query->orderBy( 'id', $orderBy )->paginate($request->get('par-page'))->withQueryString(); } else { $countryStates = $query->orderBy( 'id', $orderBy )->paginate()->withQueryString(); } return view('location::countrystate.index', compact('countryStates')); } /** * Show the form for creating a new resource. */ public function create() { checkAdminHasPermissionAndThrowException('state.create'); $countries=Country::all(); return view('location::countrystate.create', compact('countries')); } /** * Store a newly created resource in storage. */ public function store(Request $request): RedirectResponse { checkAdminHasPermissionAndThrowException('state.store'); $rules = [ 'country'=>'required', 'title'=>'required|unique:country_states' ]; $customMessages = [ 'country.required' => trans('Country is required'), 'title.required' => trans('Title is required'), 'title.unique' => trans('Title already exist'), ]; $this->validate($request, $rules, $customMessages); $countryState=new CountryState(); $countryState->country_id=$request->country; $countryState->title=$request->title; $countryState->slug=Str::slug($request->title); $countryState->save(); return $this->redirectWithMessage(RedirectType::CREATE->value, 'admin.country-state.edit', ['country_state' => $countryState->id]); } /** * Show the specified resource. */ public function show($id) { return view('location::show'); } /** * Show the form for editing the specified resource. */ public function edit($id) { checkAdminHasPermissionAndThrowException('state.edit'); $countries=Country::all(); $countryState = CountryState::findOrFail($id); return view('location::countrystate.edit', compact('countries','countryState')); } /** * Update the specified resource in storage. */ public function update(Request $request, $id): RedirectResponse { checkAdminHasPermissionAndThrowException('state.update'); $rules = [ 'country'=>'required', 'title'=>'required|unique:country_states,title,'.$id ]; $customMessages = [ 'country.required' => trans('Country field is required'), 'title.required' => trans('Title is required'), 'title.unique' => trans('Title already exist'), ]; $this->validate($request, $rules, $customMessages); $countryState = CountryState::findOrFail($id); $countryState->country_id=$request->country; $countryState->title=$request->title; $countryState->slug=Str::slug($request->title); $countryState->save(); return $this->redirectWithMessage(RedirectType::UPDATE->value, 'admin.country-state.edit', ['country_state' => $countryState->id]); } /** * Remove the specified resource from storage. */ public function destroy($id) { checkAdminHasPermissionAndThrowException('state.delete'); $countryState = CountryState::findOrFail($id); if ($countryState->cities()->count() > 0) { $notification = trans('You can not delete this state there are multiple city exist under this state.'); $notification=array('messege'=>$notification,'alert-type'=>'error'); return redirect()->back()->with($notification); } $countryState->delete(); return $this->redirectWithMessage(RedirectType::DELETE->value, 'admin.country-state.index'); } public function statusUpdate($id) { checkAdminHasPermissionAndThrowException('state.update'); $countryState = CountryState::find($id); $status = $countryState->status == 1 ? 0 : 1; $countryState->update(['status' => $status]); $notification = __('Updated Successfully'); return response()->json([ 'success' => true, 'message' => $notification, ]); } } app/Http/Controllers/.gitkeep 0000644 00000000000 15012226773 0012175 0 ustar 00 app/Http/Controllers/CityController.php 0000644 00000012056 15012226773 0014247 0 ustar 00 <?php namespace Modules\Location\app\Http\Controllers; use App\Enums\RedirectType; use Illuminate\Http\Request; use Illuminate\Http\Response; use App\Traits\RedirectHelperTrait; use App\Http\Controllers\Controller; use Illuminate\Pagination\Paginator; use Illuminate\Http\RedirectResponse; use Modules\Location\app\Models\City; use Modules\Location\app\Models\CountryState; use Str; class CityController extends Controller { use RedirectHelperTrait; /** * Display a listing of the resource. */ public function index(Request $request) { checkAdminHasPermissionAndThrowException('city.view'); $query = City::query(); $query->when($request->filled('keyword'), function ($qa) use ($request) { $qa->where('title', 'like', '%'.$request->keyword.'%'); }); $query->when($request->filled('status'), function ($q) use ($request) { $q->where('status', $request->status); }); $orderBy = $request->filled( 'order_by' ) && $request->order_by == 1 ? 'asc' : 'desc'; if ($request->filled('par-page')) { $cities = $request->get('par-page') == 'all' ? $query->orderBy( 'id', $orderBy )->get() : $query->orderBy( 'id', $orderBy )->paginate($request->get('par-page'))->withQueryString(); } else { $cities = $query->orderBy( 'id', $orderBy )->paginate()->withQueryString(); } return view('location::city.index', compact('cities')); } /** * Show the form for creating a new resource. */ public function create() { checkAdminHasPermissionAndThrowException('city.create'); $countryStates=CountryState::all(); return view('location::city.create', compact('countryStates')); } /** * Store a newly created resource in storage. */ public function store(Request $request): RedirectResponse { checkAdminHasPermissionAndThrowException('city.store'); $rules = [ 'state'=>'required', 'title'=>'required|unique:cities' ]; $customMessages = [ 'state.required' => trans('State Name field is required'), 'title.required' => trans('City is required'), 'title.unique' => trans('City already exist'), ]; $this->validate($request, $rules, $customMessages); $city=new City(); $city->country_state_id=$request->state; $city->title=$request->title; $city->slug=Str::slug($request->title); $city->save(); return $this->redirectWithMessage(RedirectType::CREATE->value, 'admin.city.edit', ['city' => $city->id]); } /** * Show the specified resource. */ public function show($id) { return view('location::show'); } /** * Show the form for editing the specified resource. */ public function edit($id) { checkAdminHasPermissionAndThrowException('city.edit'); $countryStates=CountryState::all(); $city = City::findOrFail($id); return view('location::city.edit', compact('countryStates','city')); } /** * Update the specified resource in storage. */ public function update(Request $request, $id): RedirectResponse { checkAdminHasPermissionAndThrowException('city.update'); $rules = [ 'state'=>'required', 'title'=>'required|unique:cities,title,'.$id ]; $customMessages = [ 'state.required' => trans('State is required'), 'title.required' => trans('City is required'), 'title.unique' => trans('City already exist'), ]; $this->validate($request, $rules, $customMessages); $city = City::findOrFail($id); $city->country_state_id=$request->state; $city->title=$request->title; $city->slug=Str::slug($request->title); $city->save(); return $this->redirectWithMessage(RedirectType::UPDATE->value, 'admin.city.edit', ['city' => $city->id]); } /** * Remove the specified resource from storage. */ public function destroy($id) { checkAdminHasPermissionAndThrowException('city.delete'); $city = City::findOrFail($id); if ($city->properties()->count() > 0) { $notification = trans('You can not delete this city there are multiple property exist under this city.'); $notification=array('messege'=>$notification,'alert-type'=>'error'); return redirect()->back()->with($notification); } $city->delete(); return $this->redirectWithMessage(RedirectType::DELETE->value, 'admin.city.index'); } public function statusUpdate($id) { checkAdminHasPermissionAndThrowException('city.update'); $city = City::find($id); $status = $city->status == 1 ? 0 : 1; $city->update(['status' => $status]); $notification = __('Updated Successfully'); return response()->json([ 'success' => true, 'message' => $notification, ]); } } app/Http/Controllers/CountryController.php 0000644 00000011330 15012226773 0014774 0 ustar 00 <?php namespace Modules\Location\app\Http\Controllers; use Str; use App\Enums\RedirectType; use Illuminate\Http\Request; use Illuminate\Http\Response; use App\Traits\RedirectHelperTrait; use App\Http\Controllers\Controller; use Illuminate\Pagination\Paginator; use Illuminate\Http\RedirectResponse; use Modules\Location\app\Models\Country; class CountryController extends Controller { use RedirectHelperTrait; /** * Display a listing of the resource. */ public function index(Request $request) { checkAdminHasPermissionAndThrowException('country.view'); $query = Country::query(); $query->when($request->filled('keyword'), function ($qa) use ($request) { $qa->where('title', 'like', '%'.$request->keyword.'%'); }); $query->when($request->filled('status'), function ($q) use ($request) { $q->where('status', $request->status); }); $orderBy = $request->filled( 'order_by' ) && $request->order_by == 1 ? 'asc' : 'desc'; if ($request->filled('par-page')) { $countries = $request->get('par-page') == 'all' ? $query->orderBy( 'id', $orderBy )->get() : $query->orderBy( 'id', $orderBy )->paginate($request->get('par-page'))->withQueryString(); } else { $countries = $query->orderBy( 'id', $orderBy )->paginate()->withQueryString(); } return view('location::country.index', compact('countries')); } /** * Show the form for creating a new resource. */ public function create() { checkAdminHasPermissionAndThrowException('country.create'); return view('location::country.create'); } /** * Store a newly created resource in storage. */ public function store(Request $request): RedirectResponse { checkAdminHasPermissionAndThrowException('country.store'); $rules = [ 'title'=>'required|unique:countries' ]; $customMessages = [ 'title.required' => trans('Title is required'), 'title.unique' => trans('Title already exist'), ]; $this->validate($request, $rules, $customMessages); $country=new Country(); $country->title=$request->title; $country->slug=Str::slug($request->title); $country->save(); return $this->redirectWithMessage(RedirectType::CREATE->value, 'admin.country.edit', ['country' => $country->id]); } /** * Show the specified resource. */ public function show($id) { return view('location::show'); } /** * Show the form for editing the specified resource. */ public function edit($id) { checkAdminHasPermissionAndThrowException('country.edit'); $country = Country::findOrFail($id); return view('location::country.edit', compact('country')); } /** * Update the specified resource in storage. */ public function update(Request $request, $id): RedirectResponse { checkAdminHasPermissionAndThrowException('country.update'); $rules = [ 'title'=>'required|unique:countries,title,'.$id ]; $customMessages = [ 'title.required' => trans('Title is required'), 'title.unique' => trans('Title already exist'), ]; $this->validate($request, $rules, $customMessages); $country = Country::findOrFail($id); $country->title=$request->title; $country->slug=Str::slug($request->title); $country->save(); return $this->redirectWithMessage(RedirectType::UPDATE->value, 'admin.country.edit', ['country' => $country->id]); } /** * Remove the specified resource from storage. */ public function destroy($id) { checkAdminHasPermissionAndThrowException('country.delete'); $country = Country::findOrFail($id); if ($country->countryStates()->count() > 0) { $notification = trans('You can not delete this country there are multiple state exist under this country.'); $notification=array('messege'=>$notification,'alert-type'=>'error'); return redirect()->back()->with($notification); } $country->delete(); return $this->redirectWithMessage(RedirectType::DELETE->value, 'admin.country.index'); } public function statusUpdate($id) { checkAdminHasPermissionAndThrowException('country.update'); $country = Country::find($id); $status = $country->status == 1 ? 0 : 1; $country->update(['status' => $status]); $notification = __('Updated Successfully'); return response()->json([ 'success' => true, 'message' => $notification, ]); } } app/Http/Requests/.gitkeep 0000644 00000000000 15012226773 0011502 0 ustar 00 app/Http/Middleware/.gitkeep 0000644 00000000000 15012226773 0011744 0 ustar 00 app/Models/.gitkeep 0000644 00000000000 15012226773 0010173 0 ustar 00 app/Models/error_log 0000644 00000001656 15012226773 0010501 0 ustar 00 [14-May-2025 12:59:33 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Database\Eloquent\Model" not found in /home/c7lekhnath/silverray.com.au/Modules/Location/app/Models/CountryState.php:9 Stack trace: #0 {main} thrown in /home/c7lekhnath/silverray.com.au/Modules/Location/app/Models/CountryState.php on line 9 [14-May-2025 17:16:50 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Database\Eloquent\Model" not found in /home/c7lekhnath/silverray.com.au/Modules/Location/app/Models/City.php:10 Stack trace: #0 {main} thrown in /home/c7lekhnath/silverray.com.au/Modules/Location/app/Models/City.php on line 10 [14-May-2025 20:53:36 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Database\Eloquent\Model" not found in /home/c7lekhnath/silverray.com.au/Modules/Location/app/Models/Country.php:9 Stack trace: #0 {main} thrown in /home/c7lekhnath/silverray.com.au/Modules/Location/app/Models/Country.php on line 9 app/Models/City.php 0000644 00000001341 15012226773 0010174 0 ustar 00 <?php namespace Modules\Location\app\Models; use Illuminate\Database\Eloquent\Model; use Modules\Property\app\Models\Property; use Modules\Location\Database\factories\CityFactory; use Illuminate\Database\Eloquent\Factories\HasFactory; class City extends Model { use HasFactory; /** * The attributes that are mass assignable. */ protected $fillable = ['country_state_id','title','slug','status']; protected static function newFactory(): CityFactory { //return CityFactory::new(); } public function countryState(){ return $this->belongsTo(CountryState::class)->with('country'); } public function properties(){ return $this->hasMany(Property::class); } } app/Models/CountryState.php 0000644 00000001256 15012226773 0011735 0 ustar 00 <?php namespace Modules\Location\app\Models; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Factories\HasFactory; use Modules\Location\Database\factories\CountryStateFactory; class CountryState extends Model { use HasFactory; /** * The attributes that are mass assignable. */ protected $fillable = ['country_id','title','slug','status']; protected static function newFactory(): CountryStateFactory { //return CountryStateFactory::new(); } public function country(){ return $this->belongsTo(Country::class); } public function cities(){ return $this->hasMany(City::class); } } app/Models/Country.php 0000644 00000001104 15012226773 0010724 0 ustar 00 <?php namespace Modules\Location\app\Models; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Factories\HasFactory; use Modules\Location\Database\factories\CountryFactory; class Country extends Model { use HasFactory; /** * The attributes that are mass assignable. */ protected $fillable = ['name','slug','status']; protected static function newFactory(): CountryFactory { //return CountryFactory::new(); } public function countryStates(){ return $this->hasMany(CountryState::class); } } app/Providers/RouteServiceProvider.php 0000644 00000002667 15012226773 0014164 0 ustar 00 <?php namespace Modules\Location\app\Providers; use Illuminate\Support\Facades\Route; use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; class RouteServiceProvider extends ServiceProvider { /** * The module namespace to assume when generating URLs to actions. */ protected string $moduleNamespace = 'Modules\Location\app\Http\Controllers'; /** * Called before routes are registered. * * Register any model bindings or pattern based filters. */ public function boot(): void { parent::boot(); } /** * Define the routes for the application. */ public function map(): void { $this->mapApiRoutes(); $this->mapWebRoutes(); } /** * Define the "web" routes for the application. * * These routes all receive session state, CSRF protection, etc. */ protected function mapWebRoutes(): void { Route::middleware('web') ->namespace($this->moduleNamespace) ->group(module_path('Location', '/routes/web.php')); } /** * Define the "api" routes for the application. * * These routes are typically stateless. */ protected function mapApiRoutes(): void { Route::prefix('api') ->middleware('api') ->namespace($this->moduleNamespace) ->group(module_path('Location', '/routes/api.php')); } } app/Providers/LocationServiceProvider.php 0000644 00000006446 15012226773 0014635 0 ustar 00 <?php namespace Modules\Location\app\Providers; use Illuminate\Support\Facades\Blade; use Illuminate\Support\ServiceProvider; class LocationServiceProvider extends ServiceProvider { protected string $moduleName = 'Location'; protected string $moduleNameLower = 'location'; /** * Boot the application events. */ public function boot(): void { $this->registerCommands(); $this->registerCommandSchedules(); $this->registerTranslations(); $this->registerConfig(); $this->registerViews(); $this->loadMigrationsFrom(module_path($this->moduleName, 'database/migrations')); } /** * Register the service provider. */ public function register(): void { $this->app->register(RouteServiceProvider::class); } /** * Register commands in the format of Command::class */ protected function registerCommands(): void { // $this->commands([]); } /** * Register command Schedules. */ protected function registerCommandSchedules(): void { // $this->app->booted(function () { // $schedule = $this->app->make(Schedule::class); // $schedule->command('inspire')->hourly(); // }); } /** * Register translations. */ public function registerTranslations(): void { $langPath = resource_path('lang/modules/'.$this->moduleNameLower); if (is_dir($langPath)) { $this->loadTranslationsFrom($langPath, $this->moduleNameLower); $this->loadJsonTranslationsFrom($langPath); } else { $this->loadTranslationsFrom(module_path($this->moduleName, 'lang'), $this->moduleNameLower); $this->loadJsonTranslationsFrom(module_path($this->moduleName, 'lang')); } } /** * Register config. */ protected function registerConfig(): void { $this->publishes([module_path($this->moduleName, 'config/config.php') => config_path($this->moduleNameLower.'.php')], 'config'); $this->mergeConfigFrom(module_path($this->moduleName, 'config/config.php'), $this->moduleNameLower); } /** * Register views. */ public function registerViews(): void { $viewPath = resource_path('views/modules/'.$this->moduleNameLower); $sourcePath = module_path($this->moduleName, 'resources/views'); $this->publishes([$sourcePath => $viewPath], ['views', $this->moduleNameLower.'-module-views']); $this->loadViewsFrom(array_merge($this->getPublishableViewPaths(), [$sourcePath]), $this->moduleNameLower); $componentNamespace = str_replace('/', '\\', config('modules.namespace').'\\'.$this->moduleName.'\\'.config('modules.paths.generator.component-class.path')); Blade::componentNamespace($componentNamespace, $this->moduleNameLower); } /** * Get the services provided by the provider. */ public function provides(): array { return []; } private function getPublishableViewPaths(): array { $paths = []; foreach (config('view.paths') as $path) { if (is_dir($path.'/modules/'.$this->moduleNameLower)) { $paths[] = $path.'/modules/'.$this->moduleNameLower; } } return $paths; } } app/Providers/.gitkeep 0000644 00000000000 15012226773 0010725 0 ustar 00 app/Providers/error_log 0000644 00000001310 15012226773 0011216 0 ustar 00 [09-May-2025 06:01:38 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Foundation\Support\Providers\RouteServiceProvider" not found in /home/lekhnath/silverray.com.au/Modules/Location/app/Providers/RouteServiceProvider.php:8 Stack trace: #0 {main} thrown in /home/lekhnath/silverray.com.au/Modules/Location/app/Providers/RouteServiceProvider.php on line 8 [09-May-2025 06:03:25 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Support\ServiceProvider" not found in /home/lekhnath/silverray.com.au/Modules/Location/app/Providers/LocationServiceProvider.php:8 Stack trace: #0 {main} thrown in /home/lekhnath/silverray.com.au/Modules/Location/app/Providers/LocationServiceProvider.php on line 8 database/factories/.gitkeep 0000644 00000000000 15012226773 0011713 0 ustar 00 database/migrations/2024_07_26_102853_create_countries_table.php 0000644 00000001256 15012226773 0020021 0 ustar 00 <?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; return new class extends Migration { /** * Run the migrations. */ public function up(): void { Schema::create('countries', function (Blueprint $table) { $table->id(); $table->string('title')->nullable(); $table->string('slug')->nullable(); $table->boolean('status')->default(true); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('countries'); } }; database/migrations/.gitkeep 0000644 00000000000 15012226773 0012110 0 ustar 00 database/migrations/2024_07_26_112038_create_country_states_table.php 0000644 00000001343 15012226773 0021065 0 ustar 00 <?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; return new class extends Migration { /** * Run the migrations. */ public function up(): void { Schema::create('country_states', function (Blueprint $table) { $table->id(); $table->integer('country_id'); $table->string('title')->nullable(); $table->string('slug')->nullable(); $table->boolean('status')->default(true); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('country_states'); } }; database/migrations/2024_07_26_120049_create_cities_table.php 0000644 00000001331 15012226773 0017255 0 ustar 00 <?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; return new class extends Migration { /** * Run the migrations. */ public function up(): void { Schema::create('cities', function (Blueprint $table) { $table->id(); $table->integer('country_state_id'); $table->string('title')->nullable(); $table->string('slug')->nullable(); $table->boolean('status')->default(true); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('cities'); } }; database/seeders/.gitkeep 0000644 00000000000 15012226773 0011366 0 ustar 00 database/seeders/LocationDatabaseSeeder.php 0000644 00000000375 15012226773 0015012 0 ustar 00 <?php namespace Modules\Location\database\seeders; use Illuminate\Database\Seeder; class LocationDatabaseSeeder extends Seeder { /** * Run the database seeds. */ public function run(): void { // $this->call([]); } } database/seeders/error_log 0000644 00000000532 15012226773 0011664 0 ustar 00 [16-May-2025 06:48:08 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Database\Seeder" not found in /home/c7lekhnath/silverray.com.au/Modules/Location/database/seeders/LocationDatabaseSeeder.php:7 Stack trace: #0 {main} thrown in /home/c7lekhnath/silverray.com.au/Modules/Location/database/seeders/LocationDatabaseSeeder.php on line 7 resources/assets/.gitkeep 0000644 00000000000 15012226773 0011504 0 ustar 00 resources/assets/js/app.js 0000644 00000000000 15012226773 0011605 0 ustar 00 resources/assets/sass/app.scss 0000644 00000000000 15012226773 0012501 0 ustar 00 resources/views/sidebar.blade.php 0000644 00000002420 15012226773 0013106 0 ustar 00 @if (Module::isEnabled('Location')) <li class="nav-item dropdown {{ isRoute(['admin.country.*', 'admin.country-state.*','admin.city.*'], 'active') }}"> <a href="javascript:void()" class="nav-link has-dropdown"><i class="fas fa-map-marker-alt"></i> <span>{{ __('Locations') }}</span></a> <ul class="dropdown-menu"> @if (checkAdminHasPermission('country.view')) <li class="{{ isRoute('admin.country.*', 'active') }}"> <a class="nav-link" href="{{ route('admin.country.index') }}"> {{ __('Country List') }} </a> </li> @endif @if (checkAdminHasPermission('state.view')) <li class="{{ isRoute('admin.country-state.*', 'active') }}"> <a class="nav-link" href="{{ route('admin.country-state.index') }}"> {{ __('State List') }} </a> </li> @endif @if (checkAdminHasPermission('city.view')) <li class="{{ isRoute('admin.city.*', 'active') }}"> <a class="nav-link" href="{{ route('admin.city.index') }}"> {{ __('City List') }} </a> </li> @endif </ul> </li> @endif resources/views/layouts/master.blade.php 0000644 00000001745 15012226773 0014501 0 ustar 00 <!DOCTYPE html> <html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="csrf-token" content="{{ csrf_token() }}"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Location Module - {{ config('app.name', 'Laravel') }}</title> <meta name="description" content="{{ $description ?? '' }}"> <meta name="keywords" content="{{ $keywords ?? '' }}"> <meta name="author" content="{{ $author ?? '' }}"> <!-- Fonts --> <link rel="preconnect" href="https://fonts.bunny.net"> <link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" /> {{-- Vite CSS --}} {{-- {{ module_vite('build-location', 'resources/assets/sass/app.scss') }} --}} </head> <body> @yield('content') {{-- Vite JS --}} {{-- {{ module_vite('build-location', 'resources/assets/js/app.js') }} --}} </body> resources/views/country/edit.blade.php 0000644 00000004545 15012226773 0014137 0 ustar 00 @extends('admin.master_layout') @section('title') <title>{{ __('Edit Country') }}</title> @endsection @section('admin-content') <div class="main-content"> <section class="section"> <x-admin.breadcrumb title="{{ __('Edit Country') }}" :list="[ __('Dashboard') => route('admin.dashboard'), __('Country') => route('admin.country.index'), __('Edit Country') => '#', ]" /> <div class="section-body"> <div class="mt-4 row"> <div class="col-12"> <div class="card"> <div class="card-header d-flex justify-content-between"> <x-admin.form-title :text="__('Edit Country')" /> <div> <x-admin.back-button :href="route('admin.country.index')" /> </div> </div> <div class="card-body"> <form action="{{ route('admin.country.update', ['country' => $country->id]) }}" method="post"> @csrf @method('PUT') <div class="row"> <div class="col-md-8 offset-md-2"> <div class="form-group"> <x-admin.form-input id="title" name="title" label="{{ __('Title') }}" placeholder="{{ __('Enter Title') }}" value="{{ old('title', $country->title) }}" required="true"/> </div> </div> <div class="text-center offset-md-2 col-md-8"> <x-admin.update-button :text="__('Update')"> </x-admin.update-button> </div> </div> </form> </div> </div> </div> </div> </div> </section> </div> @endsection resources/views/country/create.blade.php 0000644 00000004275 15012226773 0014455 0 ustar 00 @extends('admin.master_layout') @section('title') <title>{{ __('Create Country') }}</title> @endsection @section('admin-content') <div class="main-content"> <section class="section"> <x-admin.breadcrumb title="{{ __('Create Country') }}" :list="[ __('Dashboard') => route('admin.dashboard'), __('Country') => route('admin.country.index'), __('Create Country') => '#', ]" /> <div class="section-body"> <div class="mt-4 row"> <div class="col-12"> <div class="card"> <div class="card-header d-flex justify-content-between"> <x-admin.form-title :text="__('Create Country')" /> <div> <x-admin.back-button :href="route('admin.country.index')" /> </div> </div> <div class="card-body"> <form action="{{ route('admin.country.store') }}" method="post"> @csrf <div class="row"> <div class="col-md-8 offset-md-2"> <div class="form-group"> <x-admin.form-input id="title" name="title" label="{{ __('Title') }}" placeholder="{{ __('Enter Title') }}" value="{{ old('title') }}" required="true"/> </div> </div> <div class="text-center offset-md-2 col-md-8"> <x-admin.save-button :text="__('Save')"> </x-admin.save-button> </div> </div> </form> </div> </div> </div> </div> </div> </section> </div> @endsection resources/views/country/index.blade.php 0000644 00000023474 15012226773 0014323 0 ustar 00 @extends('admin.master_layout') @section('title') <title>{{ __('Country List') }}</title> @endsection @section('admin-content') <div class="main-content"> <section class="section"> <x-admin.breadcrumb title="{{ __('Country') }}" :list="[ __('Dashboard') => route('admin.dashboard'), __('Country') => '#', ]" /> <div class="section-body"> <div class="mt-4 row"> {{-- Search filter --}} <div class="col-12"> <div class="card"> <div class="card-body p-0"> <form action="{{ route('admin.country.index') }}" method="GET" onchange="$(this).trigger('submit')" class="card-body"> <div class="row"> <div class="col-md-3 form-group mb-3 mb-md-0"> <x-admin.form-input name="keyword" placeholder="{{ __('Search') }}" value="{{ request()->get('keyword') }}" /> </div> <div class="col-md-3 form-group mb-3 mb-md-0"> <x-admin.form-select name="status" id="status" class="form-select"> <x-admin.select-option value="" text="{{ __('Select Status') }}" /> <x-admin.select-option :selected="request('status') == '1'" value="1" text="{{ __('Yes') }}" /> <x-admin.select-option :selected="request('status') == '0'" value="0" text="{{ __('No') }}" /> </x-admin.form-select> </div> <div class="col-md-3 form-group mb-3 mb-md-0"> <x-admin.form-select name="order_by" id="order_by" class="form-select"> <x-admin.select-option value="" text="{{ __('Order By') }}" /> <x-admin.select-option :selected="request('order_by') == '1'" value="1" text="{{ __('ASC') }}" /> <x-admin.select-option :selected="request('order_by') == '0'" value="0" text="{{ __('DESC') }}" /> </x-admin.form-select> </div> <div class="col-md-3 form-group mb-3 mb-md-0"> <x-admin.form-select name="par-page" id="par-page" class="form-select"> <x-admin.select-option value="" text="{{ __('Per Page') }}" /> <x-admin.select-option :selected="request('par-page') == '5'" value="5" text="{{ __('5') }}" /> <x-admin.select-option :selected="request('par-page') == '10'" value="10" text="{{ __('10') }}" /> <x-admin.select-option :selected="request('par-page') == '25'" value="25" text="{{ __('25') }}" /> <x-admin.select-option :selected="request('par-page') == '50'" value="50" text="{{ __('50') }}" /> <x-admin.select-option :selected="request('par-page') == '100'" value="100" text="{{ __('100') }}" /> <x-admin.select-option :selected="request('par-page') == 'all'" value="all" text="{{ __('All') }}" /> </x-admin.form-select> </div> </div> </form> </div> </div> </div> <div class="col-12"> <div class="card"> <div class="card-header d-flex justify-content-between"> <x-admin.form-title :text="__('Country')" /> <div> <x-admin.add-button :href="route('admin.country.create')" /> </div> </div> <div class="card-body"> <div class="table-responsive max-h-400"> <table class="table table-striped"> <thead> <tr> <th width="10%">{{ __('SN') }}</th> <th width="50%">{{ __('Title') }}</th> <th width="20%">{{ __('Status') }}</th> <th width="20%" class="text-center">{{ __('Actions') }}</th> </tr> </thead> <tbody> @forelse ($countries as $country) <tr> <td>{{ $loop->index + 1 }}</td> <td>{{ $country->title }}</td> <td> <input onchange="changeStatus({{ $country->id }})" id="status_toggle" type="checkbox" {{ $country->status ? 'checked' : '' }} data-toggle="toggle" data-on="{{ __('Active') }}" data-off="{{ __('Inactive') }}" data-onstyle="success" data-offstyle="danger"> </td> <td class="text-center"> <div> <x-admin.edit-button :href="route('admin.country.edit', [ 'country' => $country->id, ])" /> <x-admin.delete-button :id="$country->id" onclick="deleteData" /> </div> </td> </tr> @empty <x-empty-table :name="__('Country')" route="admin.country.create" create="yes" :message="__('No data found!')" colspan="5"></x-empty-table> @endforelse </tbody> </table> </div> @if (request()->get('par-page') !== 'all') <div class="float-right"> {{ $countries->onEachSide(0)->links() }} </div> @endif </div> </div> </div> </div> </div> </section> </div> <x-admin.delete-modal /> @endsection @push('js') <script> function deleteData(id) { $("#deleteForm").attr("action", '{{ url('/admin/country/') }}' + "/" + id) } function changeStatus(id) { var isDemo = "{{ env('APP_MODE') ?? 'LIVE' }}"; if (isDemo == 'DEMO') { toastr.error("{{ __('This Is Demo Version. You Can Not Change Anything') }}"); return; } $.ajax({ type: "put", data: { _token: '{{ csrf_token() }}', }, url: "{{ url('/admin/country/status-update') }}" + "/" + id, success: function(response) { if (response.success) { toastr.success(response.message); } else { toastr.warning(response.message); } }, error: function(err) { handleFetchError(err); } }) } </script> @endpush @push('css') <style> .dd-custom-css { position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, -131px, 0px); } .max-h-400 { min-height: 400px; } </style> @endpush resources/views/.gitkeep 0000644 00000000000 15012226773 0011337 0 ustar 00 resources/views/countrystate/edit.blade.php 0000644 00000006464 15012226773 0015202 0 ustar 00 @extends('admin.master_layout') @section('title') <title>{{ __('Edit State') }}</title> @endsection @section('admin-content') <div class="main-content"> <section class="section"> <x-admin.breadcrumb title="{{ __('Edit State') }}" :list="[ __('Dashboard') => route('admin.dashboard'), __('State') => route('admin.country-state.index'), __('Edit State') => '#', ]" /> <div class="section-body"> <div class="mt-4 row"> <div class="col-12"> <div class="card"> <div class="card-header d-flex justify-content-between"> <x-admin.form-title :text="__('Edit State')" /> <div> <x-admin.back-button :href="route('admin.country-state.index')" /> </div> </div> <div class="card-body"> <form action="{{ route('admin.country-state.update', ['country_state' => $countryState->id]) }}" method="post"> @csrf @method('PUT') <div class="row"> <div class="col-md-8 offset-md-2"> <div class="form-group"> <x-admin.form-select name="country" id="country" class="select2" label="{{ __('Country') }} " required="true"> <x-admin.select-option value="" text="{{ __('Select Country') }}" /> @foreach ($countries as $country) <x-admin.select-option :selected="$country->id == old('country', $countryState->country_id)" value="{{ $country->id }}" text="{{ $country->title }}" /> @endforeach </x-admin.form-select> </div> </div> <div class="col-md-8 offset-md-2"> <div class="form-group"> <x-admin.form-input id="title" name="title" label="{{ __('Title') }}" placeholder="{{ __('Enter Title') }}" value="{{ old('title', $countryState->title) }}" required="true"/> </div> </div> <div class="text-center offset-md-2 col-md-8"> <x-admin.update-button :text="__('Update')"> </x-admin.update-button> </div> </div> </form> </div> </div> </div> </div> </div> </section> </div> @endsection resources/views/countrystate/create.blade.php 0000644 00000006145 15012226773 0015514 0 ustar 00 @extends('admin.master_layout') @section('title') <title>{{ __('Create State') }}</title> @endsection @section('admin-content') <div class="main-content"> <section class="section"> <x-admin.breadcrumb title="{{ __('Create State') }}" :list="[ __('Dashboard') => route('admin.dashboard'), __('State') => route('admin.country-state.index'), __('Create State') => '#', ]" /> <div class="section-body"> <div class="mt-4 row"> <div class="col-12"> <div class="card"> <div class="card-header d-flex justify-content-between"> <x-admin.form-title :text="__('Create State')" /> <div> <x-admin.back-button :href="route('admin.country-state.index')" /> </div> </div> <div class="card-body"> <form action="{{ route('admin.country-state.store') }}" method="post"> @csrf <div class="row"> <div class="col-md-8 offset-md-2"> <div class="form-group"> <x-admin.form-select name="country" id="country" class="select2" label="{{ __('Country') }} " required="true"> <x-admin.select-option value="" text="{{ __('Select Country') }}" /> @foreach ($countries as $country) <x-admin.select-option :selected="$country->id == old('country')" value="{{ $country->id }}" text="{{ $country->title }}" /> @endforeach </x-admin.form-select> </div> </div> <div class="col-md-8 offset-md-2"> <div class="form-group"> <x-admin.form-input id="title" name="title" label="{{ __('Title') }}" placeholder="{{ __('Enter Title') }}" value="{{ old('title') }}" required="true"/> </div> </div> <div class="text-center offset-md-2 col-md-8"> <x-admin.save-button :text="__('Save')"> </x-admin.save-button> </div> </div> </form> </div> </div> </div> </div> </div> </section> </div> @endsection resources/views/countrystate/index.blade.php 0000644 00000024220 15012226773 0015352 0 ustar 00 @extends('admin.master_layout') @section('title') <title>{{ __('State List') }}</title> @endsection @section('admin-content') <div class="main-content"> <section class="section"> <x-admin.breadcrumb title="{{ __('Country State') }}" :list="[ __('Dashboard') => route('admin.dashboard'), __('Country State') => '#', ]" /> <div class="section-body"> <div class="mt-4 row"> {{-- Search filter --}} <div class="col-12"> <div class="card"> <div class="card-body p-0"> <form action="{{ route('admin.country-state.index') }}" method="GET" onchange="$(this).trigger('submit')" class="card-body"> <div class="row"> <div class="col-md-3 form-group mb-3 mb-md-0"> <x-admin.form-input name="keyword" placeholder="{{ __('Search') }}" value="{{ request()->get('keyword') }}" /> </div> <div class="col-md-3 form-group mb-3 mb-md-0"> <x-admin.form-select name="status" id="status" class="form-select"> <x-admin.select-option value="" text="{{ __('Select Status') }}" /> <x-admin.select-option :selected="request('status') == '1'" value="1" text="{{ __('Yes') }}" /> <x-admin.select-option :selected="request('status') == '0'" value="0" text="{{ __('No') }}" /> </x-admin.form-select> </div> <div class="col-md-3 form-group mb-3 mb-md-0"> <x-admin.form-select name="order_by" id="order_by" class="form-select"> <x-admin.select-option value="" text="{{ __('Order By') }}" /> <x-admin.select-option :selected="request('order_by') == '1'" value="1" text="{{ __('ASC') }}" /> <x-admin.select-option :selected="request('order_by') == '0'" value="0" text="{{ __('DESC') }}" /> </x-admin.form-select> </div> <div class="col-md-3 form-group mb-3 mb-md-0"> <x-admin.form-select name="par-page" id="par-page" class="form-select"> <x-admin.select-option value="" text="{{ __('Per Page') }}" /> <x-admin.select-option :selected="request('par-page') == '5'" value="5" text="{{ __('5') }}" /> <x-admin.select-option :selected="request('par-page') == '10'" value="10" text="{{ __('10') }}" /> <x-admin.select-option :selected="request('par-page') == '25'" value="25" text="{{ __('25') }}" /> <x-admin.select-option :selected="request('par-page') == '50'" value="50" text="{{ __('50') }}" /> <x-admin.select-option :selected="request('par-page') == '100'" value="100" text="{{ __('100') }}" /> <x-admin.select-option :selected="request('par-page') == 'all'" value="all" text="{{ __('All') }}" /> </x-admin.form-select> </div> </div> </form> </div> </div> </div> <div class="col-12"> <div class="card"> <div class="card-header d-flex justify-content-between"> <x-admin.form-title :text="__('Country State')" /> <div> <x-admin.add-button :href="route('admin.country-state.create')" /> </div> </div> <div class="card-body"> <div class="table-responsive max-h-400"> <table class="table table-striped"> <thead> <tr> <th width="10%">{{ __('SN') }}</th> <th width="30%">{{ __('State') }}</th> <th width="30%">{{ __('Country') }}</th> <th width="15%">{{ __('Status') }}</th> <th width="15%" class="text-center">{{ __('Actions') }}</th> </tr> </thead> <tbody> @forelse ($countryStates as $countryState) <tr> <td>{{ $loop->index + 1 }}</td> <td>{{ $countryState->title }}</td> <td>{{ $countryState->country->title }}</td> <td> <input onchange="changeStatus({{ $countryState->id }})" id="status_toggle" type="checkbox" {{ $countryState->status ? 'checked' : '' }} data-toggle="toggle" data-on="{{ __('Active') }}" data-off="{{ __('Inactive') }}" data-onstyle="success" data-offstyle="danger"> </td> <td class="text-center"> <div> <x-admin.edit-button :href="route('admin.country-state.edit', [ 'country_state' => $countryState->id, ])" /> <x-admin.delete-button :id="$countryState->id" onclick="deleteData" /> </div> </td> </tr> @empty <x-empty-table :name="__('State')" route="admin.country-state.create" create="yes" :message="__('No data found!')" colspan="5"></x-empty-table> @endforelse </tbody> </table> </div> @if (request()->get('par-page') !== 'all') <div class="float-right"> {{ $countryStates->onEachSide(0)->links() }} </div> @endif </div> </div> </div> </div> </div> </section> </div> <x-admin.delete-modal /> @endsection @push('js') <script> function deleteData(id) { $("#deleteForm").attr("action", '{{ url('/admin/country-state/') }}' + "/" + id) } function changeStatus(id) { var isDemo = "{{ env('APP_MODE') ?? 'LIVE' }}"; if (isDemo == 'DEMO') { toastr.error("{{ __('This Is Demo Version. You Can Not Change Anything') }}"); return; } $.ajax({ type: "put", data: { _token: '{{ csrf_token() }}', }, url: "{{ url('/admin/country-state/status-update') }}" + "/" + id, success: function(response) { if (response.success) { toastr.success(response.message); } else { toastr.warning(response.message); } }, error: function(err) { handleFetchError(err); } }) } </script> @endpush @push('css') <style> .dd-custom-css { position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, -131px, 0px); } .max-h-400 { min-height: 400px; } </style> @endpush resources/views/city/edit.blade.php 0000644 00000006451 15012226773 0013402 0 ustar 00 @extends('admin.master_layout') @section('title') <title>{{ __('Edit City') }}</title> @endsection @section('admin-content') <div class="main-content"> <section class="section"> <x-admin.breadcrumb title="{{ __('Edit City') }}" :list="[ __('Dashboard') => route('admin.dashboard'), __('City') => route('admin.city.index'), __('Edit City') => '#', ]" /> <div class="section-body"> <div class="mt-4 row"> <div class="col-12"> <div class="card"> <div class="card-header d-flex justify-content-between"> <x-admin.form-title :text="__('Edit City')" /> <div> <x-admin.back-button :href="route('admin.city.index')" /> </div> </div> <div class="card-body"> <form action="{{ route('admin.city.update', ['city' => $city->id]) }}" method="post"> @csrf @method('PUT') <div class="row"> <div class="col-md-8 offset-md-2"> <div class="form-group"> <x-admin.form-select name="state" id="state" class="select2" label="{{ __('State') }} " required="true"> <x-admin.select-option value="" text="{{ __('Select State') }}" /> @foreach ($countryStates as $countryState) <x-admin.select-option :selected="old('state', $city->country_state_id)==$countryState->id" value="{{ $countryState->id }}" text="{{ $countryState->title.', '.$countryState->country->title }}" /> @endforeach </x-admin.form-select> </div> </div> <div class="col-md-8 offset-md-2"> <div class="form-group"> <x-admin.form-input id="title" name="title" label="{{ __('Title') }}" placeholder="{{ __('Enter Title') }}" value="{{ old('title', $city->title) }}" required="true"/> </div> </div> <div class="text-center offset-md-2 col-md-8"> <x-admin.update-button :text="__('Update')"> </x-admin.update-button> </div> </div> </form> </div> </div> </div> </div> </div> </section> </div> @endsection resources/views/city/create.blade.php 0000644 00000006163 15012226773 0013720 0 ustar 00 @extends('admin.master_layout') @section('title') <title>{{ __('Create City') }}</title> @endsection @section('admin-content') <div class="main-content"> <section class="section"> <x-admin.breadcrumb title="{{ __('Create City') }}" :list="[ __('Dashboard') => route('admin.dashboard'), __('City') => route('admin.city.index'), __('Create City') => '#', ]" /> <div class="section-body"> <div class="mt-4 row"> <div class="col-12"> <div class="card"> <div class="card-header d-flex justify-content-between"> <x-admin.form-title :text="__('Create City')" /> <div> <x-admin.back-button :href="route('admin.city.index')" /> </div> </div> <div class="card-body"> <form action="{{ route('admin.city.store') }}" method="post"> @csrf <div class="row"> <div class="col-md-8 offset-md-2"> <div class="form-group"> <x-admin.form-select name="state" id="state" class="select2" label="{{ __('State') }} " required="true"> <x-admin.select-option value="" text="{{ __('Select State') }}" /> @foreach ($countryStates as $countryState) <x-admin.select-option :selected="old('state')==$countryState->id" value="{{ $countryState->id }}" text="{{ $countryState->title.', '.$countryState->country->title }}" /> @endforeach </x-admin.form-select> </div> </div> <div class="col-md-8 offset-md-2"> <div class="form-group"> <x-admin.form-input id="title" name="title" label="{{ __('Title') }}" placeholder="{{ __('Enter Title') }}" value="{{ old('title') }}" required="true"/> </div> </div> <div class="text-center offset-md-2 col-md-8"> <x-admin.save-button :text="__('Save')"> </x-admin.save-button> </div> </div> </form> </div> </div> </div> </div> </div> </section> </div> @endsection resources/views/city/index.blade.php 0000644 00000023765 15012226773 0013573 0 ustar 00 @extends('admin.master_layout') @section('title') <title>{{ __('City List') }}</title> @endsection @section('admin-content') <div class="main-content"> <section class="section"> <x-admin.breadcrumb title="{{ __('City') }}" :list="[ __('Dashboard') => route('admin.dashboard'), __('City') => '#', ]" /> <div class="section-body"> <div class="mt-4 row"> {{-- Search filter --}} <div class="col-12"> <div class="card"> <div class="card-body p-0"> <form action="{{ route('admin.city.index') }}" method="GET" onchange="$(this).trigger('submit')" class="card-body"> <div class="row"> <div class="col-md-3 form-group mb-3 mb-md-0"> <x-admin.form-input name="keyword" placeholder="{{ __('Search') }}" value="{{ request()->get('keyword') }}" /> </div> <div class="col-md-3 form-group mb-3 mb-md-0"> <x-admin.form-select name="status" id="status" class="form-select"> <x-admin.select-option value="" text="{{ __('Select Status') }}" /> <x-admin.select-option :selected="request('status') == '1'" value="1" text="{{ __('Yes') }}" /> <x-admin.select-option :selected="request('status') == '0'" value="0" text="{{ __('No') }}" /> </x-admin.form-select> </div> <div class="col-md-3 form-group mb-3 mb-md-0"> <x-admin.form-select name="order_by" id="order_by" class="form-select"> <x-admin.select-option value="" text="{{ __('Order By') }}" /> <x-admin.select-option :selected="request('order_by') == '1'" value="1" text="{{ __('ASC') }}" /> <x-admin.select-option :selected="request('order_by') == '0'" value="0" text="{{ __('DESC') }}" /> </x-admin.form-select> </div> <div class="col-md-3 form-group mb-3 mb-md-0"> <x-admin.form-select name="par-page" id="par-page" class="form-select"> <x-admin.select-option value="" text="{{ __('Per Page') }}" /> <x-admin.select-option :selected="request('par-page') == '5'" value="5" text="{{ __('5') }}" /> <x-admin.select-option :selected="request('par-page') == '10'" value="10" text="{{ __('10') }}" /> <x-admin.select-option :selected="request('par-page') == '25'" value="25" text="{{ __('25') }}" /> <x-admin.select-option :selected="request('par-page') == '50'" value="50" text="{{ __('50') }}" /> <x-admin.select-option :selected="request('par-page') == '100'" value="100" text="{{ __('100') }}" /> <x-admin.select-option :selected="request('par-page') == 'all'" value="all" text="{{ __('All') }}" /> </x-admin.form-select> </div> </div> </form> </div> </div> </div> <div class="col-12"> <div class="card"> <div class="card-header d-flex justify-content-between"> <x-admin.form-title :text="__('City')" /> <div> <x-admin.add-button :href="route('admin.city.create')" /> </div> </div> <div class="card-body"> <div class="table-responsive max-h-400"> <table class="table table-striped"> <thead> <tr> <th width="10%">{{ __('SN') }}</th> <th width="20%">{{ __('City') }}</th> <th width="20%">{{ __('State') }}</th> <th width="20%">{{ __('Country') }}</th> <th width="15%">{{ __('Status') }}</th> <th width="15%" class="text-center">{{ __('Actions') }}</th> </tr> </thead> <tbody> @forelse ($cities as $city) <tr> <td>{{ $loop->index + 1 }}</td> <td>{{ $city->title }}</td> <td>{{ $city->countryState->title }}</td> <td>{{ $city->countryState->country->title }}</td> <td> <input onchange="changeStatus({{ $city->id }})" id="status_toggle" type="checkbox" {{ $city->status ? 'checked' : '' }} data-toggle="toggle" data-on="{{ __('Active') }}" data-off="{{ __('Inactive') }}" data-onstyle="success" data-offstyle="danger"> </td> <td class="text-center"> <div> <x-admin.edit-button :href="route('admin.city.edit', ['city' => $city->id])" /> <x-admin.delete-button :id="$city->id" onclick="deleteData" /> </div> </td> </tr> @empty <x-empty-table :name="__('City')" route="admin.city.create" create="yes" :message="__('No data found!')" colspan="6"></x-empty-table> @endforelse </tbody> </table> </div> @if (request()->get('par-page') !== 'all') <div class="float-right"> {{ $cities->onEachSide(0)->links() }} </div> @endif </div> </div> </div> </div> </div> </section> </div> <x-admin.delete-modal /> @endsection @push('js') <script> function deleteData(id) { $("#deleteForm").attr("action", '{{ url('/admin/city/') }}' + "/" + id) } function changeStatus(id) { var isDemo = "{{ env('APP_MODE') ?? 'LIVE' }}"; if (isDemo == 'DEMO') { toastr.error("{{ __('This Is Demo Version. You Can Not Change Anything') }}"); return; } $.ajax({ type: "put", data: { _token: '{{ csrf_token() }}', }, url: "{{ url('/admin/city/status-update') }}" + "/" + id, success: function(response) { if (response.success) { toastr.success(response.message); } else { toastr.warning(response.message); } }, error: function(err) { handleFetchError(err); } }) } </script> @endpush @push('css') <style> .dd-custom-css { position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, -131px, 0px); } .max-h-400 { min-height: 400px; } </style> @endpush resources/views/index.blade.php 0000644 00000000223 15012226773 0012603 0 ustar 00 @extends('location::layouts.master') @section('content') <h1>Hello World</h1> <p>Module: {!! config('location.name') !!}</p> @endsection
| ver. 1.4 |
Github
|
.
| PHP 8.3.20 | Генерация страницы: 0.01 |
proxy
|
phpinfo
|
Настройка