Файловый менеджер - Редактировать - /home/c7lekhnath/silverray.com.au/Modules/Language/database/seeders/68334/SocialLink.tar
Назад
lang/.gitkeep 0000644 00000000000 15012236577 0007114 0 ustar 00 module.json 0000644 00000000352 15012236577 0006734 0 ustar 00 { "name": "SocialLink", "alias": "sociallink", "description": "", "keywords": [], "priority": 0, "providers": [ "Modules\\SocialLink\\app\\Providers\\SocialLinkServiceProvider" ], "files": [] } tests/Unit/.gitkeep 0000644 00000000000 15012236577 0010254 0 ustar 00 tests/Feature/.gitkeep 0000644 00000000000 15012236577 0010730 0 ustar 00 vite.config.js 0000644 00000001312 15012236577 0007322 0 ustar 00 import { defineConfig } from 'vite'; import laravel from 'laravel-vite-plugin'; export default defineConfig({ build: { outDir: '../../public/build-sociallink', emptyOutDir: true, manifest: true, }, plugins: [ laravel({ publicDirectory: '../../public', buildDirectory: 'build-sociallink', 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 15012236577 0007514 0 ustar 00 routes/error_log 0000644 00000001120 15012236577 0010004 0 ustar 00 [07-May-2025 22:42:12 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Support\Facades\Route" not found in /home/lekhnath/silverray.com.au/Modules/SocialLink/routes/api.php:17 Stack trace: #0 {main} thrown in /home/lekhnath/silverray.com.au/Modules/SocialLink/routes/api.php on line 17 [07-May-2025 23:48:05 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Support\Facades\Route" not found in /home/lekhnath/silverray.com.au/Modules/SocialLink/routes/web.php:17 Stack trace: #0 {main} thrown in /home/lekhnath/silverray.com.au/Modules/SocialLink/routes/web.php on line 17 routes/web.php 0000644 00000001276 15012236577 0007371 0 ustar 00 <?php use Illuminate\Support\Facades\Route; use Modules\SocialLink\app\Http\Controllers\SocialLinkController; /* |-------------------------------------------------------------------------- | 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::group(['as' => 'admin.', 'prefix' => 'admin', 'middleware' => ['auth:admin', 'translation']], function () { Route::resource('social-link', SocialLinkController::class)->names('social-link'); }); routes/api.php 0000644 00000001241 15012236577 0007355 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('sociallink', fn (Request $request) => $request->user())->name('sociallink'); }); composer.json 0000644 00000001317 15012236577 0007300 0 ustar 00 { "name": "nwidart/sociallink", "description": "", "authors": [ { "name": "Nicolas Widart", "email": "n.widart@gmail.com" } ], "extra": { "laravel": { "providers": [], "aliases": { } } }, "autoload": { "psr-4": { "Modules\\SocialLink\\": "", "Modules\\SocialLink\\App\\": "app/", "Modules\\SocialLink\\Database\\Factories\\": "database/factories/", "Modules\\SocialLink\\Database\\Seeders\\": "database/seeders/" } }, "autoload-dev": { "psr-4": { "Modules\\SocialLink\\Tests\\": "tests/" } } } config/config.php 0000644 00000000057 15012236577 0010001 0 ustar 00 <?php return [ 'name' => 'SocialLink', ]; config/.gitkeep 0000644 00000000000 15012236577 0007440 0 ustar 00 package.json 0000644 00000000410 15012236577 0007035 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/SocialLinkController.php 0000644 00000005665 15012236577 0015402 0 ustar 00 <?php namespace Modules\SocialLink\app\Http\Controllers; use Illuminate\Http\Request; use Illuminate\Http\Response; use App\Http\Controllers\Controller; use Illuminate\Http\RedirectResponse; use Illuminate\Support\Facades\Cache; use Modules\SocialLink\app\Models\SocialLink; class SocialLinkController extends Controller { /** * Display a listing of the resource. */ public function index() { checkAdminHasPermissionAndThrowException('social.link.management'); $socialLinks = SocialLink::paginate(25); return view('sociallink::index', compact('socialLinks')); } /** * Show the form for creating a new resource. */ public function create() { return view('sociallink::create'); } /** * Store a newly created resource in storage. */ public function store(Request $request) { checkAdminHasPermissionAndThrowException('social.link.management'); $request->validate([ 'link' => ['required'], 'icon' => ['required'], ]); SocialLink::create( [ 'link' => $request->link, 'icon' => $request->icon, ] ); Cache::forget('frontSocialLinks'); return redirect()->route('admin.social-link.index')->with(['messege' => __('Updated successfully'), 'alert-type' => 'success']); } /** * Show the specified resource. */ public function show($id) { return view('sociallink::show'); } /** * Show the form for editing the specified resource. */ public function edit($id) { checkAdminHasPermissionAndThrowException('social.link.management'); $socialLink = SocialLink::findOrFail($id); return view('sociallink::edit', compact('socialLink')); } /** * Update the specified resource in storage. */ public function update(Request $request, $id) { checkAdminHasPermissionAndThrowException('social.link.management'); $request->validate([ 'link' => ['required'], 'icon' => ['required'], ]); $socialLink = SocialLink::findOrFail($id); $data = []; $data['link'] = $request->link; $data['icon'] = $request->icon; $socialLink->update($data); Cache::forget('frontSocialLinks'); return redirect()->route('admin.social-link.index')->with(['messege' => __('Updated successfully'), 'alert-type' => 'success']); } /** * Remove the specified resource from storage. */ public function destroy($id) { checkAdminHasPermissionAndThrowException('social.link.management'); $socialLink = SocialLink::findOrFail($id); $socialLink->delete(); Cache::forget('frontSocialLinks'); return redirect()->route('admin.social-link.index')->with(['messege' => __('Deleted successfully'), 'alert-type' => 'success']); } } app/Http/Controllers/.gitkeep 0000644 00000000000 15012236577 0012200 0 ustar 00 app/Http/Controllers/error_log 0000644 00000000545 15012236577 0012502 0 ustar 00 [13-May-2025 12:36:58 UTC] PHP Fatal error: Uncaught Error: Class "App\Http\Controllers\Controller" not found in /home/lekhnath/silverray.com.au/Modules/SocialLink/app/Http/Controllers/SocialLinkController.php:12 Stack trace: #0 {main} thrown in /home/lekhnath/silverray.com.au/Modules/SocialLink/app/Http/Controllers/SocialLinkController.php on line 12 app/Http/Requests/.gitkeep 0000644 00000000000 15012236577 0011505 0 ustar 00 app/Http/Middleware/.gitkeep 0000644 00000000000 15012236577 0011747 0 ustar 00 app/Models/.gitkeep 0000644 00000000000 15012236577 0010176 0 ustar 00 app/Models/SocialLink.php 0000644 00000000562 15012236577 0011323 0 ustar 00 <?php namespace Modules\SocialLink\app\Models; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Factories\HasFactory; use Modules\SocialLink\Database\factories\SocialLinkFactory; class SocialLink extends Model { use HasFactory; /** * The attributes that are mass assignable. */ protected $fillable = ['link', 'icon']; } app/Providers/RouteServiceProvider.php 0000644 00000002677 15012236577 0014170 0 ustar 00 <?php namespace Modules\SocialLink\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\SocialLink\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('SocialLink', '/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('SocialLink', '/routes/api.php')); } } app/Providers/.gitkeep 0000644 00000000000 15012236577 0010730 0 ustar 00 app/Providers/SocialLinkServiceProvider.php 0000644 00000006456 15012236577 0015121 0 ustar 00 <?php namespace Modules\SocialLink\app\Providers; use Illuminate\Support\Facades\Blade; use Illuminate\Support\ServiceProvider; class SocialLinkServiceProvider extends ServiceProvider { protected string $moduleName = 'SocialLink'; protected string $moduleNameLower = 'sociallink'; /** * 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/error_log 0000644 00000001334 15012236577 0011227 0 ustar 00 [14-May-2025 15:01:20 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Foundation\Support\Providers\RouteServiceProvider" not found in /home/c7lekhnath/silverray.com.au/Modules/SocialLink/app/Providers/RouteServiceProvider.php:8 Stack trace: #0 {main} thrown in /home/c7lekhnath/silverray.com.au/Modules/SocialLink/app/Providers/RouteServiceProvider.php on line 8 [14-May-2025 15:54:50 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Support\ServiceProvider" not found in /home/c7lekhnath/silverray.com.au/Modules/SocialLink/app/Providers/SocialLinkServiceProvider.php:8 Stack trace: #0 {main} thrown in /home/c7lekhnath/silverray.com.au/Modules/SocialLink/app/Providers/SocialLinkServiceProvider.php on line 8 database/factories/.gitkeep 0000644 00000000000 15012236577 0011716 0 ustar 00 database/migrations/2024_05_26_065953_create_social_links_table.php 0000644 00000001260 15012236577 0020465 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('social_links', function (Blueprint $table) { $table->id(); $table->string('link')->nullable(); $table->string('icon')->nullable(); $table->boolean('status')->default(1); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('social_links'); } }; database/migrations/.gitkeep 0000644 00000000000 15012236577 0012113 0 ustar 00 database/migrations/error_log 0000644 00000000630 15012236577 0012410 0 ustar 00 [13-May-2025 05:54:07 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Database\Migrations\Migration" not found in /home/lekhnath/silverray.com.au/Modules/SocialLink/database/migrations/2024_05_26_065953_create_social_links_table.php:7 Stack trace: #0 {main} thrown in /home/lekhnath/silverray.com.au/Modules/SocialLink/database/migrations/2024_05_26_065953_create_social_links_table.php on line 7 database/seeders/SocialLinkDatabaseSeeder.php 0000644 00000000401 15012236577 0015263 0 ustar 00 <?php namespace Modules\SocialLink\database\seeders; use Illuminate\Database\Seeder; class SocialLinkDatabaseSeeder extends Seeder { /** * Run the database seeds. */ public function run(): void { // $this->call([]); } } database/seeders/.gitkeep 0000644 00000000000 15012236577 0011371 0 ustar 00 database/seeders/error_log 0000644 00000000542 15012236577 0011670 0 ustar 00 [16-May-2025 13:33:37 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Database\Seeder" not found in /home/c7lekhnath/silverray.com.au/Modules/SocialLink/database/seeders/SocialLinkDatabaseSeeder.php:7 Stack trace: #0 {main} thrown in /home/c7lekhnath/silverray.com.au/Modules/SocialLink/database/seeders/SocialLinkDatabaseSeeder.php on line 7 resources/assets/.gitkeep 0000644 00000000000 15012236577 0011507 0 ustar 00 resources/assets/js/app.js 0000644 00000000000 15012236577 0011610 0 ustar 00 resources/assets/sass/app.scss 0000644 00000000000 15012236577 0012504 0 ustar 00 resources/views/sidebar.blade.php 0000644 00000000511 15012236577 0013110 0 ustar 00 @if (Module::isEnabled('SocialLink') && Route::has('admin.social-link.index')) <li class="{{ isRoute('admin.social-link.*', 'active') }}"> <a class="nav-link" href="{{ route('admin.social-link.index') }}"> <i class="fas fa-hashtag"></i> <span>{{ __('Social Links') }}</span> </a> </li> @endif resources/views/edit.blade.php 0000644 00000006623 15012236577 0012436 0 ustar 00 @extends('admin.master_layout') @section('title') <title>{{ __('Update Social Link') }}</title> @endsection @section('admin-content') <div class="main-content"> <section class="section"> <x-admin.breadcrumb title="{{ __('Update Social Link') }}" :list="[ __('Dashboard') => route('admin.dashboard'), __('Social Links') => route('admin.social-link.index'), __('Update Social Link') => '#', ]" /> <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="__('Update Social Link')" /> <div> <x-admin.back-button :href="route('admin.social-link.index')" /> </div> </div> <div class="card-body"> <form action="{{ route('admin.social-link.update', $socialLink->id) }}" method="post" enctype="multipart/form-data"> @csrf @method('PUT') <div class="row"> <div class="col-md-12"> <div class="form-group"> <x-admin.form-input class="custom-icon-picker" id="icon" name="icon" label="{{ __('Icon') }}" placeholder="{{ __('Enter icon') }}" value="{{ old('icon', $socialLink->icon) }}" required="true" autocomplete="off"/> </div> </div> <div class="col-md-12"> <div class="form-group"> <x-admin.form-input id="link" name="link" label="{{ __('Link') }}" placeholder="{{ __('Enter link') }}" value="{{ old('link', $socialLink->link) }}" required="true"/> </div> </div> <div class="col-md-12"> <x-admin.update-button :text="__('Update')"/> </div> </div> </form> </div> </div> </div> </div> </div> </section> </div> @endsection @push('js') <script src="{{ asset('backend/js/jquery.uploadPreview.min.js') }}"></script> <script> 'use strict'; $(function() { $.uploadPreview({ input_field: "#image-upload", preview_box: "#image-preview", label_field: "#image-label", label_default: "{{ __('Choose Icon') }}", label_selected: "{{ __('Change Icon') }}", no_label: false, success_callback: null }); }); </script> @endpush resources/views/.gitkeep 0000644 00000000000 15012236577 0011342 0 ustar 00 resources/views/create.blade.php 0000644 00000006500 15012236577 0012746 0 ustar 00 @extends('admin.master_layout') @section('title') <title>{{ __('Add Social Link') }}</title> @endsection @section('admin-content') <div class="main-content"> <section class="section"> <x-admin.breadcrumb title="{{ __('Add Social Link') }}" :list="[ __('Dashboard') => route('admin.dashboard'), __('Social Links') => route('admin.social-link.index'), __('Add Social Link') => '#', ]" /> <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="__('Add Social Link')" /> <div> <x-admin.back-button :href="route('admin.social-link.index')" /> </div> </div> <div class="card-body"> <form action="{{ route('admin.social-link.store') }}" method="post" enctype="multipart/form-data"> @csrf <div class="row"> <div class="col-md-12"> <div class="form-group"> <x-admin.form-input class="custom-icon-picker" id="icon" name="icon" label="{{ __('Icon') }}" placeholder="{{ __('Enter icon') }}" value="{{ old('icon') }}" required="true" autocomplete="off"/> </div> </div> <div class="col-md-12"> <div class="form-group"> <x-admin.form-input id="link" name="link" label="{{ __('Link') }}" placeholder="{{ __('Enter link') }}" value="{{ old('link') }}" required="true"/> </div> </div> <div class="col-md-12"> <x-admin.save-button :text="__('Save')" /> </div> </div> </form> </div> </div> </div> </div> </div> </section> </div> @endsection @push('js') <script src="{{ asset('backend/js/jquery.uploadPreview.min.js') }}"></script> <script> 'use strict'; $(function() { $.uploadPreview({ input_field: "#image-upload", preview_box: "#image-preview", label_field: "#image-label", label_default: "{{ __('Choose Icon') }}", label_selected: "{{ __('Change Icon') }}", no_label: false, success_callback: null }); }); </script> @endpush resources/views/index.blade.php 0000644 00000010235 15012236577 0012612 0 ustar 00 @extends('admin.master_layout') @section('title') <title>{{ __('Social Links') }}</title> @endsection @section('admin-content') <div class="main-content"> <section class="section"> {{-- Breadcrumb --}} <x-admin.breadcrumb title="{{ __('Social Links') }}" :list="[ __('Dashboard') => route('admin.dashboard'), __('Social Links') => '#', ]" /> <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="__('Social Links')" /> <div> <x-admin.add-button :href="route('admin.social-link.create')" /> </div> </div> <div class="card-body"> <div class="table-responsive max-h-400"> <table class="table table-striped"> <thead> <tr> <th>{{ __('SN') }}</th> <th>{{ __('Icon') }}</th> <th>{{ __('Link') }}</th> <th class="text-center">{{ __('Actions') }}</th> </tr> </thead> <tbody> @forelse ($socialLinks as $link) <tr> <td>{{ $loop->index + 1 }}</td> {{-- <td class="bg-transparent-black"><img class="thumb p-2 w_60px" src="{{ asset($link->icon) }}" alt=""></td> --}} <td><i class="{{ $link->icon }}"></i></td> <td>{{ $link->link }}</td> <td class="text-center"> <div> <x-admin.edit-button :href="route('admin.social-link.edit', $link->id)" /> <x-admin.delete-button :id="$link->id" onclick="deleteData" /> </div> </td> </tr> @empty <x-empty-table :name="__('Social Links')" route="admin.social-link.create" create="yes" :message="__('No data found!')" colspan="6"/> @endforelse </tbody> </table> </div> <div class="float-right"> {{ $socialLinks->links() }} </div> </div> </div> </div> </div> </div> </section> </div> <x-admin.delete-modal /> @endsection @push('js') <script> function deleteData(id) { $("#deleteForm").attr("action", "{{ url('/admin/social-link/') }}" + "/" + id) } </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
| ver. 1.4 |
Github
|
.
| PHP 8.3.20 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка