├── public ├── favicon.ico ├── robots.txt ├── img │ ├── 2.jpg │ └── Light_TaskSquad.png ├── webfonts │ ├── fa-solid-900.ttf │ ├── fa-brands-400.ttf │ ├── fa-duotone-900.ttf │ ├── fa-solid-900.woff2 │ ├── fa-brands-400.woff2 │ └── fa-duotone-900.woff2 ├── index.php ├── .htaccess ├── js │ ├── main.js │ └── toastr.min.js └── css │ ├── admin │ └── style.css │ └── toastr.min.css ├── database ├── .gitignore ├── seeders │ ├── DatabaseSeeder.php │ ├── RolesSeeder.php │ ├── StatusSeeder.php │ └── PermissionsSeeder.php ├── migrations │ ├── 2024_12_09_232620_create_roles_table.php │ ├── 2024_12_11_153016_create_permissions_table.php │ ├── 2024_12_11_211626_create_task_statuses_table.php │ ├── 2025_01_05_231057_create_project_statuses_table.php │ ├── 2024_12_09_122852_create_groups_table.php │ ├── 2024_12_20_232832_create_projects_table.php │ ├── 2024_12_11_153345_create_role_user_table.php │ ├── 0001_01_01_000001_create_cache_table.php │ ├── 2024_12_11_153245_create_permissions_user_table.php │ ├── 2024_12_11_211513_create_tasks_table.php │ ├── 0001_01_01_000002_create_jobs_table.php │ └── 0001_01_01_000000_create_users_table.php └── factories │ └── UserFactory.php ├── bootstrap ├── cache │ └── .gitignore ├── providers.php └── app.php ├── storage ├── logs │ └── .gitignore ├── app │ ├── private │ │ └── .gitignore │ ├── public │ │ └── .gitignore │ └── .gitignore └── framework │ ├── testing │ └── .gitignore │ ├── views │ └── .gitignore │ ├── cache │ ├── data │ │ └── .gitignore │ └── .gitignore │ ├── sessions │ └── .gitignore │ └── .gitignore ├── resources ├── js │ ├── app.js │ └── bootstrap.js ├── css │ └── app.css ├── sass │ ├── _variables.scss │ └── app.scss └── views │ ├── livewire │ └── support │ │ ├── admin │ │ ├── inc │ │ │ ├── navbar.blade.php │ │ │ └── sidebar.blade.php │ │ └── index.blade.php │ │ ├── tasks │ │ ├── status.blade.php │ │ ├── index.blade.php │ │ ├── show.blade.php │ │ └── create.blade.php │ │ ├── projects │ │ ├── status.blade.php │ │ ├── index.blade.php │ │ ├── show.blade.php │ │ └── create.blade.php │ │ ├── roles │ │ ├── create.blade.php │ │ └── index.blade.php │ │ ├── permissions │ │ ├── create.blade.php │ │ └── index.blade.php │ │ ├── groups │ │ ├── index.blade.php │ │ └── create.blade.php │ │ └── users │ │ ├── permissionUser.blade.php │ │ ├── trash.blade.php │ │ └── index.blade.php │ ├── layouts │ ├── app.blade.php │ └── admin.blade.php │ ├── auth │ ├── verify.blade.php │ ├── passwords │ │ ├── email.blade.php │ │ ├── confirm.blade.php │ │ └── reset.blade.php │ ├── login.blade.php │ └── register.blade.php │ └── welcome.blade.php ├── art ├── Dark_TaskSquad.png └── Light_TaskSquad.png ├── screenshots ├── user │ ├── admin_index.png │ ├── tasks_index.png │ └── projects_index.png └── admin │ ├── admin_index.png │ ├── groups_index.png │ ├── roles_index.png │ ├── tasks_index.png │ ├── users_index.png │ ├── projects_index.png │ └── permissions_index.png ├── postcss.config.js ├── tests ├── TestCase.php ├── Unit │ └── ExampleTest.php └── Feature │ └── ExampleTest.php ├── .gitattributes ├── routes ├── console.php └── web.php ├── app ├── Models │ ├── TaskStatus.php │ ├── ProjectStatus.php │ ├── Groups.php │ ├── Roles.php │ ├── Permissions.php │ ├── Project.php │ ├── Task.php │ └── User.php ├── Http │ └── Controllers │ │ ├── AdminController.php │ │ ├── Controller.php │ │ ├── HomeController.php │ │ └── Auth │ │ ├── ForgotPasswordController.php │ │ ├── ResetPasswordController.php │ │ ├── ConfirmPasswordController.php │ │ ├── LoginController.php │ │ ├── VerificationController.php │ │ └── RegisterController.php ├── Providers │ ├── AppServiceProvider.php │ └── AuthServiceProvider.php └── Livewire │ └── Support │ ├── Admin │ └── Index.php │ ├── Tasks │ ├── Show.php │ ├── Status.php │ ├── Index.php │ └── Create.php │ ├── Projects │ ├── Show.php │ ├── Status.php │ ├── Index.php │ └── Create.php │ ├── Roles │ ├── Create.php │ └── Index.php │ ├── Groups │ ├── Index.php │ └── Create.php │ ├── Permissions │ ├── Create.php │ └── Index.php │ └── Users │ ├── Index.php │ ├── Trash.php │ ├── PermissionUser.php │ ├── Create.php │ └── Edit.php ├── .editorconfig ├── vite.config.js ├── .gitignore ├── artisan ├── package.json ├── tailwind.config.js ├── LICENSE ├── config ├── services.php ├── filesystems.php ├── cache.php ├── mail.php ├── queue.php ├── auth.php ├── app.php └── logging.php ├── phpunit.xml ├── .env.example ├── composer.json └── README.md /public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite* 2 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /resources/js/app.js: -------------------------------------------------------------------------------- 1 | import './bootstrap'; 2 | 3 | -------------------------------------------------------------------------------- /storage/app/private/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !private/ 3 | !public/ 4 | !.gitignore 5 | -------------------------------------------------------------------------------- /public/img/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rayiumir/TaskSquad/HEAD/public/img/2.jpg -------------------------------------------------------------------------------- /art/Dark_TaskSquad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rayiumir/TaskSquad/HEAD/art/Dark_TaskSquad.png -------------------------------------------------------------------------------- /resources/css/app.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | -------------------------------------------------------------------------------- /art/Light_TaskSquad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rayiumir/TaskSquad/HEAD/art/Light_TaskSquad.png -------------------------------------------------------------------------------- /public/img/Light_TaskSquad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rayiumir/TaskSquad/HEAD/public/img/Light_TaskSquad.png -------------------------------------------------------------------------------- /public/webfonts/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rayiumir/TaskSquad/HEAD/public/webfonts/fa-solid-900.ttf -------------------------------------------------------------------------------- /screenshots/user/admin_index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rayiumir/TaskSquad/HEAD/screenshots/user/admin_index.png -------------------------------------------------------------------------------- /screenshots/user/tasks_index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rayiumir/TaskSquad/HEAD/screenshots/user/tasks_index.png -------------------------------------------------------------------------------- /public/webfonts/fa-brands-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rayiumir/TaskSquad/HEAD/public/webfonts/fa-brands-400.ttf -------------------------------------------------------------------------------- /public/webfonts/fa-duotone-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rayiumir/TaskSquad/HEAD/public/webfonts/fa-duotone-900.ttf -------------------------------------------------------------------------------- /public/webfonts/fa-solid-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rayiumir/TaskSquad/HEAD/public/webfonts/fa-solid-900.woff2 -------------------------------------------------------------------------------- /screenshots/admin/admin_index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rayiumir/TaskSquad/HEAD/screenshots/admin/admin_index.png -------------------------------------------------------------------------------- /screenshots/admin/groups_index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rayiumir/TaskSquad/HEAD/screenshots/admin/groups_index.png -------------------------------------------------------------------------------- /screenshots/admin/roles_index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rayiumir/TaskSquad/HEAD/screenshots/admin/roles_index.png -------------------------------------------------------------------------------- /screenshots/admin/tasks_index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rayiumir/TaskSquad/HEAD/screenshots/admin/tasks_index.png -------------------------------------------------------------------------------- /screenshots/admin/users_index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rayiumir/TaskSquad/HEAD/screenshots/admin/users_index.png -------------------------------------------------------------------------------- /public/webfonts/fa-brands-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rayiumir/TaskSquad/HEAD/public/webfonts/fa-brands-400.woff2 -------------------------------------------------------------------------------- /public/webfonts/fa-duotone-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rayiumir/TaskSquad/HEAD/public/webfonts/fa-duotone-900.woff2 -------------------------------------------------------------------------------- /screenshots/admin/projects_index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rayiumir/TaskSquad/HEAD/screenshots/admin/projects_index.png -------------------------------------------------------------------------------- /screenshots/user/projects_index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rayiumir/TaskSquad/HEAD/screenshots/user/projects_index.png -------------------------------------------------------------------------------- /screenshots/admin/permissions_index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rayiumir/TaskSquad/HEAD/screenshots/admin/permissions_index.png -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /bootstrap/providers.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | 3 | *.blade.php diff=html 4 | *.css diff=css 5 | *.html diff=html 6 | *.md diff=markdown 7 | *.php diff=php 8 | 9 | /.github export-ignore 10 | CHANGELOG.md export-ignore 11 | .styleci.yml export-ignore 12 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 8 | })->purpose('Display an inspiring quote')->hourly(); 9 | -------------------------------------------------------------------------------- /tests/Unit/ExampleTest.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Models/TaskStatus.php: -------------------------------------------------------------------------------- 1 | route('login'); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | handleCommand(new ArgvInput); 14 | 15 | exit($status); 16 | -------------------------------------------------------------------------------- /tests/Feature/ExampleTest.php: -------------------------------------------------------------------------------- 1 | get('/'); 16 | 17 | $response->assertStatus(200); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /database/seeders/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call([ 16 | RolesSeeder::class, 17 | StatusSeeder::class, 18 | PermissionsSeeder::class 19 | ]); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Models/Groups.php: -------------------------------------------------------------------------------- 1 | belongsTo(Groups::class,'type','id'); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | handleRequest(Request::capture()); 18 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "type": "module", 4 | "scripts": { 5 | "build": "vite build", 6 | "dev": "vite" 7 | }, 8 | "devDependencies": { 9 | "@popperjs/core": "^2.11.6", 10 | "autoprefixer": "^10.4.20", 11 | "axios": "^1.7.4", 12 | "bootstrap": "^5.2.3", 13 | "concurrently": "^9.0.1", 14 | "laravel-vite-plugin": "^1.0", 15 | "postcss": "^8.4.47", 16 | "sass": "^1.56.1", 17 | "tailwindcss": "^3.4.13", 18 | "vite": "^5.0" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | withRouting( 10 | web: __DIR__.'/../routes/web.php', 11 | commands: __DIR__.'/../routes/console.php', 12 | health: '/up', 13 | ) 14 | ->withMiddleware(function (Middleware $middleware) { 15 | // 16 | }) 17 | ->withExceptions(function (Exceptions $exceptions) { 18 | // 19 | })->create(); 20 | -------------------------------------------------------------------------------- /app/Http/Controllers/HomeController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 17 | } 18 | 19 | /** 20 | * Show the application dashboard. 21 | * 22 | * @return \Illuminate\Contracts\Support\Renderable 23 | */ 24 | public function index() 25 | { 26 | return view('home'); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | import defaultTheme from 'tailwindcss/defaultTheme'; 2 | 3 | /** @type {import('tailwindcss').Config} */ 4 | export default { 5 | content: [ 6 | './vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php', 7 | './storage/framework/views/*.php', 8 | './resources/**/*.blade.php', 9 | './resources/**/*.js', 10 | './resources/**/*.vue', 11 | ], 12 | theme: { 13 | extend: { 14 | fontFamily: { 15 | sans: ['Figtree', ...defaultTheme.fontFamily.sans], 16 | }, 17 | }, 18 | }, 19 | plugins: [], 20 | }; 21 | -------------------------------------------------------------------------------- /app/Livewire/Support/Admin/Index.php: -------------------------------------------------------------------------------- 1 | insert([ 17 | ['title' => 'isAdmin', 'value' => 'مدیر کل', 'created_at' => now(), 'updated_at' => now()], 18 | ['title' => 'isUser', 'value' => 'کاربر عادی', 'created_at' => now(), 'updated_at' => now()] 19 | ]); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews -Indexes 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Handle Authorization Header 9 | RewriteCond %{HTTP:Authorization} . 10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 | 12 | # Redirect Trailing Slashes If Not A Folder... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_URI} (.+)/$ 15 | RewriteRule ^ %1 [L,R=301] 16 | 17 | # Send Requests To Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | 22 | -------------------------------------------------------------------------------- /app/Models/Roles.php: -------------------------------------------------------------------------------- 1 | belongsToMany(User::class, 'role_user', 'role_id', 'user_id'); 20 | } 21 | 22 | public function permissions(): \Illuminate\Database\Eloquent\Relations\BelongsToMany 23 | { 24 | return $this->belongsToMany(Permissions::class); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /app/Livewire/Support/Tasks/Show.php: -------------------------------------------------------------------------------- 1 | task = Task::find($id); 16 | $this->loadTasks(); 17 | 18 | } 19 | public function loadTasks(): void 20 | { 21 | $this->task = Task::find($this->id); 22 | } 23 | public function render(): \Illuminate\Foundation\Application|\Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory|\Illuminate\View\View 24 | { 25 | return view('livewire.support.tasks.show'); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/Models/Permissions.php: -------------------------------------------------------------------------------- 1 | belongsToMany(User::class, 'permissions_user', 'permission_id','user_id'); 20 | } 21 | public function roles(): \Illuminate\Database\Eloquent\Relations\BelongsToMany 22 | { 23 | return $this->belongsToMany(Roles::class, 'permissions_role', 'permission_id','role_id'); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/Livewire/Support/Projects/Show.php: -------------------------------------------------------------------------------- 1 | project = Project::find($id); 16 | $this->loadProjects(); 17 | 18 | } 19 | public function loadProjects(): void 20 | { 21 | $this->project = Project::find($this->id); 22 | } 23 | 24 | public function render(): \Illuminate\Foundation\Application|\Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory|\Illuminate\View\View 25 | { 26 | return view('livewire.support.projects.show'); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ForgotPasswordController.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('title')->nullable(); 17 | $table->string('value')->nullable(); 18 | $table->timestamps(); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | */ 25 | public function down(): void 26 | { 27 | Schema::dropIfExists('roles'); 28 | } 29 | }; 30 | -------------------------------------------------------------------------------- /database/migrations/2024_12_11_153016_create_permissions_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('title')->nullable(); 17 | $table->string('value')->nullable(); 18 | $table->timestamps(); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | */ 25 | public function down(): void 26 | { 27 | Schema::dropIfExists('permissions'); 28 | } 29 | }; 30 | -------------------------------------------------------------------------------- /database/migrations/2024_12_11_211626_create_task_statuses_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('title')->nullable(); 17 | $table->string('value')->nullable(); 18 | $table->timestamps(); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | */ 25 | public function down(): void 26 | { 27 | Schema::dropIfExists('task_statuses'); 28 | } 29 | }; 30 | -------------------------------------------------------------------------------- /database/migrations/2025_01_05_231057_create_project_statuses_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('title')->nullable(); 17 | $table->string('value')->nullable(); 18 | $table->timestamps(); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | */ 25 | public function down(): void 26 | { 27 | Schema::dropIfExists('project_statuses'); 28 | } 29 | }; 30 | -------------------------------------------------------------------------------- /database/migrations/2024_12_09_122852_create_groups_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('name')->nullable(); 17 | $table->string('type')->nullable(); 18 | $table->string('logo')->nullable(); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | */ 26 | public function down(): void 27 | { 28 | Schema::dropIfExists('groups'); 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /app/Providers/AuthServiceProvider.php: -------------------------------------------------------------------------------- 1 | registerPolicies(); 25 | 26 | Gate::before(function ($user) { 27 | if ($user->isAdmin()) 28 | return true; 29 | }); 30 | 31 | foreach (Permissions::all() as $permission){ 32 | Gate::define($permission->title, function ($user) use ($permission){ 33 | return $user->hasPermission($permission); 34 | }); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ResetPasswordController.php: -------------------------------------------------------------------------------- 1 | belongsTo(ProjectStatus::class,'status_id'); 24 | } 25 | 26 | public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo 27 | { 28 | return $this->belongsTo(User::class,'user_id'); 29 | } 30 | 31 | public function owner(): \Illuminate\Database\Eloquent\Relations\BelongsTo 32 | { 33 | return $this->belongsTo(User::class,'owner_id'); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /app/Livewire/Support/Tasks/Status.php: -------------------------------------------------------------------------------- 1 | task = Task::findOrFail($id); 17 | } 18 | public function statusProject(): void 19 | { 20 | $this->validate(); 21 | 22 | $this->task->update($this->validate()); 23 | 24 | $this->dispatch('toastr:success', message: 'وضعیت با موفقیت به روز رسانی شد'); 25 | $this->redirectRoute('tasks.index'); 26 | } 27 | public function render(): \Illuminate\Foundation\Application|\Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory|\Illuminate\View\View 28 | { 29 | return view('livewire.support.tasks.status'); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/Models/Task.php: -------------------------------------------------------------------------------- 1 | belongsTo(TaskStatus::class,'status_id'); 27 | } 28 | 29 | public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo 30 | { 31 | return $this->belongsTo(User::class,'user_id'); 32 | } 33 | 34 | public function owner(): \Illuminate\Database\Eloquent\Relations\BelongsTo 35 | { 36 | return $this->belongsTo(User::class,'owner_id'); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /app/Livewire/Support/Projects/Status.php: -------------------------------------------------------------------------------- 1 | project = Project::findOrFail($id); 17 | } 18 | public function statusProject(): void 19 | { 20 | $this->validate(); 21 | 22 | $this->project->update($this->validate()); 23 | 24 | $this->dispatch('toastr:success', message: 'وضعیت با موفقیت به روز رسانی شد'); 25 | $this->redirectRoute('projects.index'); 26 | } 27 | 28 | public function render(): \Illuminate\Foundation\Application|\Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory|\Illuminate\View\View 29 | { 30 | return view('livewire.support.projects.status'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2024_12_20_232832_create_projects_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('title')->nullable(); 17 | $table->longText('description')->nullable(); 18 | $table->string('user_id')->nullable(); 19 | $table->string('owner_id')->nullable(); 20 | $table->string('pic')->nullable(); 21 | $table->string('status_id')->nullable(); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | */ 29 | public function down(): void 30 | { 31 | Schema::dropIfExists('projects'); 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /database/migrations/2024_12_11_153345_create_role_user_table.php: -------------------------------------------------------------------------------- 1 | unsignedBigInteger('role_id'); 16 | $table->foreign('role_id')->references('id') 17 | ->on('roles')->onDelete('cascade'); 18 | 19 | $table->unsignedBigInteger('user_id'); 20 | $table->foreign('user_id')->references('id') 21 | ->on('users')->onDelete('cascade'); 22 | $table->primary(['role_id','user_id']); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | */ 29 | public function down(): void 30 | { 31 | Schema::dropIfExists('role_user'); 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /database/migrations/0001_01_01_000001_create_cache_table.php: -------------------------------------------------------------------------------- 1 | string('key')->primary(); 16 | $table->mediumText('value'); 17 | $table->integer('expiration'); 18 | }); 19 | 20 | Schema::create('cache_locks', function (Blueprint $table) { 21 | $table->string('key')->primary(); 22 | $table->string('owner'); 23 | $table->integer('expiration'); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | */ 30 | public function down(): void 31 | { 32 | Schema::dropIfExists('cache'); 33 | Schema::dropIfExists('cache_locks'); 34 | } 35 | }; 36 | -------------------------------------------------------------------------------- /resources/views/layouts/app.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | میزکار {{$title ?? ''}} 8 | 9 | 10 | 11 | {{ $styles ?? '' }} 12 | 13 | 14 |
15 | 16 |
17 |
18 |
19 | @yield('content') 20 |
21 |
22 |
23 | 24 |
25 | 26 | 27 | {{ $scripts ?? '' }} 28 | 29 | 30 | -------------------------------------------------------------------------------- /database/migrations/2024_12_11_153245_create_permissions_user_table.php: -------------------------------------------------------------------------------- 1 | unsignedBigInteger('permission_id'); 16 | $table->foreign('permission_id')->references('id') 17 | ->on('permissions')->onDelete('cascade'); 18 | 19 | $table->unsignedBigInteger('user_id'); 20 | $table->foreign('user_id')->references('id') 21 | ->on('users')->onDelete('cascade'); 22 | 23 | $table->primary(['permission_id','user_id']); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | */ 30 | public function down(): void 31 | { 32 | Schema::dropIfExists('permissions_user'); 33 | } 34 | }; 35 | -------------------------------------------------------------------------------- /database/migrations/2024_12_11_211513_create_tasks_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('type_id')->nullable(); 17 | $table->string('title')->nullable(); 18 | $table->string('user_id')->nullable(); 19 | $table->string('owner_id')->nullable(); 20 | $table->string('pic')->nullable(); 21 | $table->longText('description')->nullable(); 22 | $table->string('priority_id')->nullable(); 23 | $table->string('status_id')->nullable(); 24 | $table->timestamps(); 25 | }); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | */ 31 | public function down(): void 32 | { 33 | Schema::dropIfExists('tasks'); 34 | } 35 | }; 36 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Raymond Baghumian 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /database/seeders/StatusSeeder.php: -------------------------------------------------------------------------------- 1 | insert([ 17 | ['title' => 'not_done', 'value' => 'انجام نشده', 'created_at' => now(), 'updated_at' => now()], 18 | ['title' => 'done', 'value' => 'انجام شده', 'created_at' => now(), 'updated_at' => now()], 19 | ['title' => 'end', 'value' => 'پایان', 'created_at' => now(), 'updated_at' => now()] 20 | ]); 21 | 22 | DB::table('task_statuses')->insert([ 23 | ['title' => 'not_read', 'value' => 'خوانده نشده', 'created_at' => now(), 'updated_at' => now()], 24 | ['title' => 'is_read', 'value' => 'خوانده شده', 'created_at' => now(), 'updated_at' => now()], 25 | ['title' => 'end', 'value' => 'پایان', 'created_at' => now(), 'updated_at' => now()] 26 | ]); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ConfirmPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/Livewire/Support/Roles/Create.php: -------------------------------------------------------------------------------- 1 | validateOnly($title); 22 | } 23 | 24 | public function saveRoles(): void 25 | { 26 | $this->validate(); 27 | 28 | Roles::query()->create([ 29 | 'title' => $this->title, 30 | 'value' => $this->value, 31 | ]); 32 | 33 | $this->dispatch('toastr:success', message: 'مقام جدید ایجاد شد'); 34 | $this->redirectRoute('roles.index'); 35 | } 36 | 37 | public function render(): \Illuminate\Foundation\Application|\Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory|\Illuminate\View\View 38 | { 39 | return view('livewire.support.roles.create'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/LoginController.php: -------------------------------------------------------------------------------- 1 | middleware('guest')->except('logout'); 38 | $this->middleware('auth')->only('logout'); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'token' => env('POSTMARK_TOKEN'), 19 | ], 20 | 21 | 'ses' => [ 22 | 'key' => env('AWS_ACCESS_KEY_ID'), 23 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 24 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 25 | ], 26 | 27 | 'resend' => [ 28 | 'key' => env('RESEND_KEY'), 29 | ], 30 | 31 | 'slack' => [ 32 | 'notifications' => [ 33 | 'bot_user_oauth_token' => env('SLACK_BOT_USER_OAUTH_TOKEN'), 34 | 'channel' => env('SLACK_BOT_USER_DEFAULT_CHANNEL'), 35 | ], 36 | ], 37 | 38 | ]; 39 | -------------------------------------------------------------------------------- /app/Livewire/Support/Roles/Index.php: -------------------------------------------------------------------------------- 1 | readyToLoad = true; 21 | } 22 | 23 | public function deleteRole($id): void 24 | { 25 | $role = Roles::find($id); 26 | $role->delete(); 27 | $this->dispatch('toastr:success', message: 'مقام با موفقیت حذف شد'); 28 | } 29 | 30 | public function render(): \Illuminate\Foundation\Application|\Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory|\Illuminate\View\View 31 | { 32 | $roles = $this->readyToLoad ? Roles::where('title','LIKE',"%{$this->search}%")-> 33 | orWhere('value','LIKE',"%{$this->search}%")-> 34 | orWhere('id',$this->search)->latest()->paginate(15) : []; 35 | return view('livewire.support.roles.index', compact('roles')); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/Livewire/Support/Groups/Index.php: -------------------------------------------------------------------------------- 1 | readyToLoad = true; 21 | } 22 | 23 | public function deleteGroups($id): void 24 | { 25 | $group = Groups::find($id); 26 | $group->delete(); 27 | $this->dispatch('toastr:success', message: 'گروه با موفقیت حذف شد'); 28 | } 29 | 30 | public function render(): \Illuminate\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|\Illuminate\View\View 31 | { 32 | $groups = $this->readyToLoad ? Groups::where('name','LIKE',"%{$this->search}%")-> 33 | orWhere('type','LIKE',"%{$this->search}%")-> 34 | orWhere('id',$this->search)->latest()->paginate(5) : []; 35 | return view('livewire.support.groups.index', compact('groups')); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/Livewire/Support/Permissions/Create.php: -------------------------------------------------------------------------------- 1 | validateOnly($title); 23 | } 24 | 25 | public function savePermissions(): void 26 | { 27 | $this->validate(); 28 | 29 | Permissions::query()->create([ 30 | 'title' => $this->title, 31 | 'value' => $this->value, 32 | ]); 33 | 34 | $this->dispatch('toastr:success', message: 'دسترسی جدید ایجاد شد'); 35 | $this->redirectRoute('permissions.index'); 36 | } 37 | public function render(): \Illuminate\Foundation\Application|\Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory|\Illuminate\View\View 38 | { 39 | return view('livewire.support.permissions.create'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/Livewire/Support/Projects/Index.php: -------------------------------------------------------------------------------- 1 | readyToLoad = true; 22 | } 23 | 24 | public function deleteProjects($id): void 25 | { 26 | $permissions = Project::find($id); 27 | $permissions->delete(); 28 | $this->dispatch('toastr:success', message: 'پروژه با موفقیت ایجاد شد'); 29 | } 30 | 31 | public function render(): \Illuminate\Foundation\Application|\Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory|\Illuminate\View\View 32 | { 33 | $projects = Project::when(!Auth::user()->isAdmin(), function ($query) { 34 | $query->where('owner_id', Auth::id()); 35 | })->paginate(10); 36 | return view('livewire.support.projects.index', compact('projects')); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/Livewire/Support/Tasks/Index.php: -------------------------------------------------------------------------------- 1 | readyToLoad = true; 23 | } 24 | 25 | public function deleteTasks($id): void 26 | { 27 | $tasks = Task::find($id); 28 | $tasks->delete(); 29 | $this->dispatch('toastr:success', message: 'وظیفه با موفقیت حذف شد'); 30 | } 31 | 32 | public function render(): \Illuminate\Foundation\Application|\Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory|\Illuminate\View\View 33 | { 34 | $tasks = Task::when(!Auth::user()->isAdmin(), function ($query) { 35 | $query->where('owner_id', Auth::id()); 36 | })->paginate(10); 37 | 38 | return view('livewire.support.tasks.index', compact('tasks')); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/VerificationController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 38 | $this->middleware('signed')->only('verify'); 39 | $this->middleware('throttle:6,1')->only('verify', 'resend'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /database/factories/UserFactory.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class UserFactory extends Factory 13 | { 14 | /** 15 | * The current password being used by the factory. 16 | */ 17 | protected static ?string $password; 18 | 19 | /** 20 | * Define the model's default state. 21 | * 22 | * @return array 23 | */ 24 | public function definition(): array 25 | { 26 | return [ 27 | 'name' => fake()->name(), 28 | 'email' => fake()->unique()->safeEmail(), 29 | 'email_verified_at' => now(), 30 | 'password' => static::$password ??= Hash::make('password'), 31 | 'remember_token' => Str::random(10), 32 | ]; 33 | } 34 | 35 | /** 36 | * Indicate that the model's email address should be unverified. 37 | */ 38 | public function unverified(): static 39 | { 40 | return $this->state(fn (array $attributes) => [ 41 | 'email_verified_at' => null, 42 | ]); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | tests/Unit 10 | 11 | 12 | tests/Feature 13 | 14 | 15 | 16 | 17 | app 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /resources/views/auth/verify.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
9 |
10 | 11 |
12 | @if (session('resent')) 13 | 16 | @endif 17 | 18 | {{ __('Before proceeding, please check your email for a verification link.') }} 19 | {{ __('If you did not receive the email') }}, 20 |
21 | @csrf 22 | . 23 |
24 |
25 |
26 |
27 |
28 |
29 | @endsection 30 | -------------------------------------------------------------------------------- /database/seeders/PermissionsSeeder.php: -------------------------------------------------------------------------------- 1 | insert([ 17 | ['title' => 'users_index', 'value' => 'کاربران', 'created_at' => now(), 'updated_at' => now()], 18 | ['title' => 'groups_index', 'value' => 'گروه ها', 'created_at' => now(), 'updated_at' => now()], 19 | ['title' => 'roles_index', 'value' => 'مقام ها', 'created_at' => now(), 'updated_at' => now()], 20 | ['title' => 'permissions_index', 'value' => 'دسترسی ها', 'created_at' => now(), 'updated_at' => now()], 21 | ['title' => 'tasks_index', 'value' => 'وظیفه ها', 'created_at' => now(), 'updated_at' => now()], 22 | ['title' => 'projects_index', 'value' => 'پروژه ها', 'created_at' => now(), 'updated_at' => now()], 23 | ['title' => 'deletes_index', 'value' => 'دکمه های حذف', 'created_at' => now(), 'updated_at' => now()], 24 | ['title' => 'creates_index', 'value' => 'افزودن ها', 'created_at' => now(), 'updated_at' => now()] 25 | ]); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /resources/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | import 'bootstrap'; 2 | 3 | /** 4 | * We'll load the axios HTTP library which allows us to easily issue requests 5 | * to our Laravel back-end. This library automatically handles sending the 6 | * CSRF token as a header based on the value of the "XSRF" token cookie. 7 | */ 8 | 9 | import axios from 'axios'; 10 | window.axios = axios; 11 | 12 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 13 | 14 | /** 15 | * Echo exposes an expressive API for subscribing to channels and listening 16 | * for events that are broadcast by Laravel. Echo and event broadcasting 17 | * allows your team to easily build robust real-time web applications. 18 | */ 19 | 20 | // import Echo from 'laravel-echo'; 21 | 22 | // import Pusher from 'pusher-js'; 23 | // window.Pusher = Pusher; 24 | 25 | // window.Echo = new Echo({ 26 | // broadcaster: 'pusher', 27 | // key: import.meta.env.VITE_PUSHER_APP_KEY, 28 | // cluster: import.meta.env.VITE_PUSHER_APP_CLUSTER ?? 'mt1', 29 | // wsHost: import.meta.env.VITE_PUSHER_HOST ?? `ws-${import.meta.env.VITE_PUSHER_APP_CLUSTER}.pusher.com`, 30 | // wsPort: import.meta.env.VITE_PUSHER_PORT ?? 80, 31 | // wssPort: import.meta.env.VITE_PUSHER_PORT ?? 443, 32 | // forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? 'https') === 'https', 33 | // enabledTransports: ['ws', 'wss'], 34 | // }); 35 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME=Laravel 2 | APP_ENV=local 3 | APP_KEY= 4 | APP_DEBUG=true 5 | APP_TIMEZONE=UTC 6 | APP_URL=http://localhost 7 | 8 | APP_LOCALE=en 9 | APP_FALLBACK_LOCALE=en 10 | APP_FAKER_LOCALE=en_US 11 | 12 | APP_MAINTENANCE_DRIVER=file 13 | # APP_MAINTENANCE_STORE=database 14 | 15 | PHP_CLI_SERVER_WORKERS=4 16 | 17 | BCRYPT_ROUNDS=12 18 | 19 | LOG_CHANNEL=stack 20 | LOG_STACK=single 21 | LOG_DEPRECATIONS_CHANNEL=null 22 | LOG_LEVEL=debug 23 | 24 | DB_CONNECTION=sqlite 25 | # DB_HOST=127.0.0.1 26 | # DB_PORT=3306 27 | # DB_DATABASE=laravel 28 | # DB_USERNAME=root 29 | # DB_PASSWORD= 30 | 31 | SESSION_DRIVER=database 32 | SESSION_LIFETIME=120 33 | SESSION_ENCRYPT=false 34 | SESSION_PATH=/ 35 | SESSION_DOMAIN=null 36 | 37 | BROADCAST_CONNECTION=log 38 | FILESYSTEM_DISK=local 39 | QUEUE_CONNECTION=database 40 | 41 | CACHE_STORE=database 42 | CACHE_PREFIX= 43 | 44 | MEMCACHED_HOST=127.0.0.1 45 | 46 | REDIS_CLIENT=phpredis 47 | REDIS_HOST=127.0.0.1 48 | REDIS_PASSWORD=null 49 | REDIS_PORT=6379 50 | 51 | MAIL_MAILER=log 52 | MAIL_HOST=127.0.0.1 53 | MAIL_PORT=2525 54 | MAIL_USERNAME=null 55 | MAIL_PASSWORD=null 56 | MAIL_ENCRYPTION=null 57 | MAIL_FROM_ADDRESS="hello@example.com" 58 | MAIL_FROM_NAME="${APP_NAME}" 59 | 60 | AWS_ACCESS_KEY_ID= 61 | AWS_SECRET_ACCESS_KEY= 62 | AWS_DEFAULT_REGION=us-east-1 63 | AWS_BUCKET= 64 | AWS_USE_PATH_STYLE_ENDPOINT=false 65 | 66 | VITE_APP_NAME="${APP_NAME}" 67 | -------------------------------------------------------------------------------- /resources/views/livewire/support/tasks/status.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | - به روز رسانی وضعیت 4 | 5 |
6 |
7 |
8 |
9 |
10 | 11 | 17 |
@error('status_id') {{ $message }} @enderror
18 |
19 |
20 | 21 |
22 |
23 |
24 |
25 |
26 |
27 | -------------------------------------------------------------------------------- /app/Livewire/Support/Permissions/Index.php: -------------------------------------------------------------------------------- 1 | readyToLoad = true; 24 | } 25 | 26 | public function deletePermissions($id): void 27 | { 28 | $permissions = Permissions::find($id); 29 | $permissions->delete(); 30 | $this->dispatch('toastr:success', message: 'دسترسی با موفقیت حذف شد'); 31 | } 32 | 33 | public function render(): \Illuminate\Foundation\Application|\Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory|\Illuminate\View\View 34 | { 35 | $permissions = $this->readyToLoad ? Permissions::where('title','LIKE',"%{$this->search}%")-> 36 | orWhere('value','LIKE',"%{$this->search}%")-> 37 | orWhere('id',$this->search)->latest()->paginate(15) : []; 38 | return view('livewire.support.permissions.index', compact('permissions')); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /resources/views/livewire/support/projects/status.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | - به روز رسانی وضعیت 4 | 5 |
6 |
7 |
8 |
9 |
10 | 11 | 17 |
@error('status_id') {{ $message }} @enderror
18 |
19 |
20 | 21 |
22 |
23 |
24 |
25 |
26 |
27 | 28 | -------------------------------------------------------------------------------- /app/Livewire/Support/Users/Index.php: -------------------------------------------------------------------------------- 1 | readyToLoad = true; 23 | } 24 | 25 | public function deleteUser($id): void 26 | { 27 | $user = User::find($id); 28 | $user->delete(); 29 | $this->dispatch('toastr:warning', message: 'کاربر به زباله دان فرستاده شد.'); 30 | } 31 | 32 | public function render(): \Illuminate\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|\Illuminate\View\View 33 | { 34 | $users = $this->readyToLoad ? User::where('name','LIKE',"%{$this->search}%")-> 35 | orWhere('email','LIKE',"%{$this->search}%")-> 36 | orWhere('mobile','LIKE',"%{$this->search}%")-> 37 | orWhere('phone','LIKE',"%{$this->search}%")-> 38 | orWhere('position','LIKE',"%{$this->search}%")-> 39 | orWhere('id',$this->search)->latest()->paginate(5) : []; 40 | return view('livewire.support.users.index', compact('users')); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /resources/views/livewire/support/roles/create.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | - ایجاد مقام جدید 4 | 5 |
6 |
7 |
8 |
9 |
10 | 11 | 12 |
@error('title') {{ $message }} @enderror
13 |
14 |
15 | 16 | 17 |
@error('value') {{ $message }} @enderror
18 |
19 |
20 | 21 |
22 |
23 |
24 |
25 |
26 |
27 | -------------------------------------------------------------------------------- /resources/views/livewire/support/permissions/create.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | - ایجاد دسترسی جدید 4 | 5 |
6 |
7 |
8 |
9 |
10 | 11 | 12 |
@error('title') {{ $message }} @enderror
13 |
14 |
15 | 16 | 17 |
@error('value') {{ $message }} @enderror
18 |
19 |
20 | 21 |
22 |
23 |
24 |
25 |
26 |
27 | -------------------------------------------------------------------------------- /app/Livewire/Support/Users/Trash.php: -------------------------------------------------------------------------------- 1 | readyToLoad = true; 20 | } 21 | 22 | public function deleteTrash($id): void 23 | { 24 | $user = User::withTrashed()->findOrFail($id); 25 | $pic_path = public_path("users/$user->pic"); 26 | 27 | if (is_file($pic_path)) { 28 | unlink($pic_path); 29 | } 30 | 31 | $user->forceDelete(); 32 | $this->dispatch('toastr:success', message: 'کاربر با موفقیت حذف شد'); 33 | } 34 | 35 | public function recoveryUser($id): void 36 | { 37 | $user = User::withTrashed()->where('id',$id)->first(); 38 | $user->restore(); 39 | $this->dispatch('toastr:success', message: 'کاربر با موفقیت بازیابی شد'); 40 | } 41 | 42 | public function render(): \Illuminate\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|\Illuminate\View\View 43 | { 44 | $users = $this->readyToLoad ? DB::table('users')->whereNotNull('deleted_at')->latest()->paginate(15) : []; 45 | return view('livewire.support.users.trash', compact('users')); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/Livewire/Support/Users/PermissionUser.php: -------------------------------------------------------------------------------- 1 | user = $user; 21 | $this->roles = $user->roles->pluck('id')->toArray(); 22 | $this->permissions = $user->permissions()->pluck('id')->toArray(); 23 | } 24 | 25 | public function savePermissionUser(User $user): void 26 | { 27 | if (!empty($this->roles)) { 28 | $user->roles()->sync($this->roles); 29 | } 30 | 31 | if (!empty($this->permissions)) { 32 | $user->permissions()->sync($this->permissions); 33 | } 34 | 35 | $user->roles()->role_id = $this->roles; 36 | $user->permissions()->user_id = $this->permissions; 37 | 38 | $user->save(); 39 | 40 | $this->dispatch('toastr:warning', message: 'دسترسی جدید برای کاربر ایجاد شد.'); 41 | $this->redirectRoute('users.index'); 42 | } 43 | public function render(): \Illuminate\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|\Illuminate\View\View 44 | { 45 | $user = User::all(); 46 | return view('livewire.support.users.permissionUser', compact('user')); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /resources/views/welcome.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | TaskSquad 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 |
17 |
18 | 19 |
20 | @if (Route::has('login')) 21 | @auth 22 | ورود به مدیریت 23 | @else 24 | ورود 25 | 26 | @if (Route::has('register')) 27 | عضویت 28 | @endif 29 | @endauth 30 | @endif 31 |
32 |
33 |
34 | 35 | 36 | -------------------------------------------------------------------------------- /app/Livewire/Support/Groups/Create.php: -------------------------------------------------------------------------------- 1 | validateOnly($name); 25 | } 26 | 27 | public function saveGroups(): void 28 | { 29 | $this->validate(); 30 | 31 | $groups = Groups::query()->create([ 32 | 'name' => $this->name, 33 | 'type' => $this->type, 34 | ]); 35 | 36 | if ($this->logo) { 37 | $groups->update([ 38 | 'logo' => $this->uploadImage() 39 | ]); 40 | } 41 | 42 | $this->dispatch('toastr:success', message: 'گروه با موفقیت ایجاد شد'); 43 | $this->redirectRoute('groups.index'); 44 | } 45 | 46 | public function uploadImage(): string 47 | { 48 | $year = now()->year; 49 | $month = now()->month; $directory = "groups/$year/$month"; 50 | $name= $this->logo->getClientOriginalName(); $this->logo->storeAs($directory,$name); 51 | return "$directory/$name"; 52 | } 53 | 54 | public function render(): \Illuminate\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|\Illuminate\View\View 55 | { 56 | return view('livewire.support.groups.create'); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /app/Livewire/Support/Tasks/Create.php: -------------------------------------------------------------------------------- 1 | validateOnly($title); 33 | } 34 | 35 | public function saveTask(): void 36 | { 37 | 38 | $this->validate(); 39 | 40 | $task = Task::query()->create([ 41 | 'type_id' => $this->type_id, 42 | 'title' => $this->title, 43 | 'user_id' => $this->user_id, 44 | 'description' => $this->description, 45 | 'owner_id' => $this->owner_id, 46 | 'status_id' => 1, 47 | 'priority_id' => $this->priority_id, 48 | ]); 49 | 50 | 51 | $this->dispatch('toastr:success', message: 'وظیفه جدید ایجاد شد'); 52 | $this->redirectRoute('tasks.index'); 53 | } 54 | 55 | public function render(): \Illuminate\Foundation\Application|\Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory|\Illuminate\View\View 56 | { 57 | return view('livewire.support.tasks.create', [ 58 | 'roles' => \App\Models\Roles::all(), 59 | 'users' => \App\Models\User::where('is_staff', 1)->get(), 60 | 'statuses' => TaskStatus::all(), 61 | ]); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /resources/views/livewire/support/roles/index.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | - مقام ها 4 | 5 |
6 | 9 |
10 | 11 |
12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | @if($readyToLoad) 24 | 25 | @foreach($roles as $row) 26 | 27 | 28 | 29 | 30 | 31 | 34 | 35 | @endforeach 36 | 37 | @else 38 | 41 | @endif 42 |
شناسهعنواننام مقام به فارسیتاریخ ایجادعملیات
{{ $row->id }}{{ $row->title }}{{ $row->value }}{{ $row->created_at }} 32 | 33 |
43 | {!! $roles->links() !!} 44 |
45 | 46 | -------------------------------------------------------------------------------- /resources/views/livewire/support/permissions/index.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | - دسترسی ها 4 | 5 |
6 | 9 |
10 | 11 |
12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | @if($readyToLoad) 24 | 25 | @foreach($permissions as $row) 26 | 27 | 28 | 29 | 32 | 33 | 36 | 37 | @endforeach 38 | 39 | @else 40 | 43 | @endif 44 |
شناسهنام دسترسیبه فارسیتاریخ ایجادعملیات
{{ $row->id }}{{ $row->title }} 30 | {{ $row->value }} 31 | {{ $row->created_at }} 34 | 35 |
45 | {!! $permissions->links() !!} 46 |
47 | -------------------------------------------------------------------------------- /resources/views/livewire/support/groups/index.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | - گروه ها 4 | 5 | 6 |
7 | 10 |
11 | 12 |
13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | @if($readyToLoad) 26 | 27 | @foreach($groups as $row) 28 | 29 | 30 | 31 | 32 | 35 | 38 | 39 | @endforeach 40 | 41 | @else 42 | 45 | @endif 46 |
شناسهلوگونام گروهسرگروهعملیات
{{ $row->id }}{{ $row->name }} 33 | {{ optional($row->groups)->name ?? 'ندارد' }} 34 | 36 | 37 |
47 | {!! $groups->links() !!} 48 |
49 | -------------------------------------------------------------------------------- /database/migrations/0001_01_01_000002_create_jobs_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('queue')->index(); 17 | $table->longText('payload'); 18 | $table->unsignedTinyInteger('attempts'); 19 | $table->unsignedInteger('reserved_at')->nullable(); 20 | $table->unsignedInteger('available_at'); 21 | $table->unsignedInteger('created_at'); 22 | }); 23 | 24 | Schema::create('job_batches', function (Blueprint $table) { 25 | $table->string('id')->primary(); 26 | $table->string('name'); 27 | $table->integer('total_jobs'); 28 | $table->integer('pending_jobs'); 29 | $table->integer('failed_jobs'); 30 | $table->longText('failed_job_ids'); 31 | $table->mediumText('options')->nullable(); 32 | $table->integer('cancelled_at')->nullable(); 33 | $table->integer('created_at'); 34 | $table->integer('finished_at')->nullable(); 35 | }); 36 | 37 | Schema::create('failed_jobs', function (Blueprint $table) { 38 | $table->id(); 39 | $table->string('uuid')->unique(); 40 | $table->text('connection'); 41 | $table->text('queue'); 42 | $table->longText('payload'); 43 | $table->longText('exception'); 44 | $table->timestamp('failed_at')->useCurrent(); 45 | }); 46 | } 47 | 48 | /** 49 | * Reverse the migrations. 50 | */ 51 | public function down(): void 52 | { 53 | Schema::dropIfExists('jobs'); 54 | Schema::dropIfExists('job_batches'); 55 | Schema::dropIfExists('failed_jobs'); 56 | } 57 | }; 58 | -------------------------------------------------------------------------------- /resources/views/auth/passwords/email.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Reset Password') }}
9 | 10 |
11 | @if (session('status')) 12 | 15 | @endif 16 | 17 |
18 | @csrf 19 | 20 |
21 | 22 | 23 |
24 | 25 | 26 | @error('email') 27 | 28 | {{ $message }} 29 | 30 | @enderror 31 |
32 |
33 | 34 |
35 |
36 | 39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | @endsection 48 | -------------------------------------------------------------------------------- /app/Livewire/Support/Projects/Create.php: -------------------------------------------------------------------------------- 1 | validateOnly($title); 30 | } 31 | 32 | public function saveProject(): void 33 | { 34 | 35 | $this->validate(); 36 | 37 | $project = Project::query()->create([ 38 | 'title' => $this->title, 39 | 'description' => $this->description, 40 | 'user_id' => $this->user_id, 41 | 'owner_id' => $this->owner_id, 42 | 'status_id' => 1, 43 | ]); 44 | 45 | if ($this->pic) { 46 | $project->update([ 47 | 'pic' => $this->uploadImage() 48 | ]); 49 | } 50 | 51 | $this->dispatch('toastr:success', message: 'پروژه با موفقیت ایجاد شد'); 52 | $this->redirectRoute('projects.index'); 53 | } 54 | public function uploadImage(): string 55 | { 56 | $year = now()->year; 57 | $month = now()->month; 58 | $directory = "projects/$year/$month"; 59 | $name= $this->pic->getClientOriginalName(); 60 | $this->pic->storeAs($directory,$name); 61 | return "$directory/$name"; 62 | } 63 | 64 | public function render(): \Illuminate\Foundation\Application|\Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory|\Illuminate\View\View 65 | { 66 | return view('livewire.support.projects.create', [ 67 | 'users' => \App\Models\User::where('is_staff', 1)->get(), 68 | ]); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /resources/views/livewire/support/users/permissionUser.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | - دسترسی های کاربر 4 | 5 |
6 |
7 |
8 |
9 |
{{ auth()->user()->name }}
10 |
11 |
12 |
13 | 14 | 19 |
@error('roles') {{ $message }} @enderror
20 |
21 |
22 | 23 | 28 |
@error('permissions') {{ $message }} @enderror
29 |
30 |
31 | 32 |
33 |
34 |
35 |
36 |
37 |
38 | 39 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/RegisterController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 41 | } 42 | 43 | /** 44 | * Get a validator for an incoming registration request. 45 | * 46 | * @param array $data 47 | * @return \Illuminate\Contracts\Validation\Validator 48 | */ 49 | protected function validator(array $data) 50 | { 51 | return Validator::make($data, [ 52 | 'name' => ['required', 'string', 'max:255'], 53 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], 54 | 'password' => ['required', 'string', 'min:8', 'confirmed'], 55 | ]); 56 | } 57 | 58 | /** 59 | * Create a new user instance after a valid registration. 60 | * 61 | * @param array $data 62 | * @return \App\Models\User 63 | */ 64 | protected function create(array $data) 65 | { 66 | return User::create([ 67 | 'name' => $data['name'], 68 | 'email' => $data['email'], 69 | 'is_staff' => 1, 70 | 'password' => Hash::make($data['password']), 71 | ]); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /database/migrations/0001_01_01_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('name'); 17 | $table->string('email')->unique(); 18 | $table->string('is_admin')->nullable(); 19 | $table->string('is_staff')->nullable(); 20 | $table->string('birthday')->nullable(); 21 | $table->string('imei')->nullable(); 22 | $table->string('group_id')->nullable(); 23 | $table->string('mobile')->nullable(); 24 | $table->string('phone')->nullable(); 25 | $table->string('gender')->nullable(); 26 | $table->string('role_id')->nullable(); 27 | $table->string('pic')->nullable(); 28 | $table->string('position')->nullable(); 29 | $table->timestamp('email_verified_at')->nullable(); 30 | $table->string('password'); 31 | $table->rememberToken(); 32 | $table->softDeletes(); 33 | $table->timestamps(); 34 | }); 35 | 36 | Schema::create('password_reset_tokens', function (Blueprint $table) { 37 | $table->string('email')->primary(); 38 | $table->string('token'); 39 | $table->timestamp('created_at')->nullable(); 40 | }); 41 | 42 | Schema::create('sessions', function (Blueprint $table) { 43 | $table->string('id')->primary(); 44 | $table->foreignId('user_id')->nullable()->index(); 45 | $table->string('ip_address', 45)->nullable(); 46 | $table->text('user_agent')->nullable(); 47 | $table->longText('payload'); 48 | $table->integer('last_activity')->index(); 49 | }); 50 | } 51 | 52 | /** 53 | * Reverse the migrations. 54 | */ 55 | public function down(): void 56 | { 57 | Schema::dropIfExists('users'); 58 | Schema::dropIfExists('password_reset_tokens'); 59 | Schema::dropIfExists('sessions'); 60 | } 61 | }; 62 | -------------------------------------------------------------------------------- /resources/views/auth/passwords/confirm.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
9 | 10 |
11 |
12 | {{ __('Please confirm your password before continuing.') }} 13 | 14 |
15 | @csrf 16 | 17 |
18 | 19 | 20 |
21 | 22 | 23 | @error('password') 24 | 25 | {{ $message }} 26 | 27 | @enderror 28 |
29 |
30 | 31 |
32 |
33 | 36 | 37 | @if (Route::has('password.request')) 38 | 39 | {{ __('Forgot Your Password?') }} 40 | 41 | @endif 42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | @endsection 51 | -------------------------------------------------------------------------------- /resources/views/livewire/support/users/trash.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | - زباله دان کاربران 4 | 5 | برگرد به صفحه اول کاربران 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | @if($readyToLoad) 21 | 22 | @foreach($users as $row) 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 35 | 36 | @endforeach 37 | 38 | @else 39 | 42 | @endif 43 |
شناسهعکسنام و نام خانوادگیایمیلسمتموبایلتاریخ ایجادعملیات
{{ $row->id }}{{ $row->name }}{{ $row->email }}{{ $row->position }}{{ $row->mobile }}{{ $row->created_at }} 32 | 33 | 34 |
44 | {!! $users->links() !!} 45 |
46 | 47 | -------------------------------------------------------------------------------- /public/js/main.js: -------------------------------------------------------------------------------- 1 | // Menu Dropdown 2 | 3 | const js_list = ".js-list"; 4 | const js_title = ".js-title"; 5 | const js_content = ".js-content"; 6 | 7 | document.addEventListener("DOMContentLoaded", () => { 8 | setUpAccordion(); 9 | }); 10 | 11 | const setUpAccordion = () => { 12 | const lists = document.querySelectorAll(js_list); 13 | const RUNNING_VALUE = "running"; 14 | const IS_OPENED_CLASS = "is-opened"; 15 | 16 | lists.forEach((element) => { 17 | const title = element.querySelector(js_title); 18 | const content = element.querySelector(js_content); 19 | 20 | // Ensure initial state respects the "open" attribute 21 | if (element.hasAttribute("open")) { 22 | element.classList.add(IS_OPENED_CLASS); 23 | } 24 | 25 | title.addEventListener("click", (event) => { 26 | event.preventDefault(); 27 | if (element.dataset.animStatus === RUNNING_VALUE) { 28 | return; 29 | } 30 | 31 | if (element.open) { 32 | // Close the menu 33 | element.classList.remove(IS_OPENED_CLASS); 34 | const closingAnim = content.animate(closingAnimKeyframes(content), animTiming); 35 | element.dataset.animStatus = RUNNING_VALUE; 36 | closingAnim.onfinish = () => { 37 | element.removeAttribute("open"); 38 | element.dataset.animStatus = ""; 39 | }; 40 | } else { 41 | // Open the menu 42 | element.setAttribute("open", "true"); 43 | element.classList.add(IS_OPENED_CLASS); 44 | const openingAnim = content.animate(openingAnimKeyframes(content), animTiming); 45 | element.dataset.animStatus = RUNNING_VALUE; 46 | openingAnim.onfinish = () => { 47 | element.dataset.animStatus = ""; 48 | }; 49 | } 50 | }); 51 | }); 52 | }; 53 | 54 | const animTiming = { 55 | duration: 200, 56 | easing: "ease-out", 57 | }; 58 | 59 | const closingAnimKeyframes = (content) => [ 60 | { height: content.offsetHeight + "px", opacity: 1 }, 61 | { height: 0, opacity: 0 }, 62 | ]; 63 | 64 | const openingAnimKeyframes = (content) => [ 65 | { height: 0, opacity: 0 }, 66 | { height: content.offsetHeight + "px", opacity: 1 }, 67 | ]; 68 | 69 | 70 | 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /resources/views/livewire/support/tasks/index.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | - وظایف ها 4 | 5 |
6 |
7 | @can('creates_index') 8 | افزودن وظایف 9 | @endcan 10 |
11 |
12 | 13 |
14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | @if($readyToLoad) 26 | 27 | @foreach($tasks as $row) 28 | 29 | 30 | 31 | 32 | 33 | 40 | 41 | @endforeach 42 | 43 | @else 44 | 47 | @endif 48 |
شناسهعنوانوضعیتتاریخ ایجادعملیات
{{ $row->id }}{{ $row->title }}{{ $row->status->value }}{{$row->created_at}} 34 | 35 | 36 | @can('deletes_index') 37 | 38 | @endcan 39 |
49 | {!! $tasks->links() !!} 50 |
51 | 52 | -------------------------------------------------------------------------------- /resources/views/layouts/admin.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | میزکار {{$title ?? ''}} 8 | 9 | 10 | 11 | 12 | @livewireStyles 13 | 14 | 15 |
16 | @include('livewire.support.admin.inc.sidebar') 17 | 18 |
19 | @include('livewire.support.admin.inc.navbar') 20 |
21 |
22 | {{$slot}} 23 |
24 |
25 |
26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | {{----}} 34 | 35 | 36 | 42 | 62 | 63 | @livewireScripts 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /resources/views/livewire/support/projects/index.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | - پروژه ها 4 | 5 |
6 |
7 | @can('creates_index') 8 | افزودن پروژه 9 | @endcan 10 |
11 |
12 | 13 |
14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | @if($readyToLoad) 27 | 28 | @foreach($projects as $row) 29 | 30 | 31 | 32 | 33 | 34 | 35 | 42 | 43 | @endforeach 44 | 45 | @else 46 | 49 | @endif 50 |
شناسهعکس پروژهعنوانوضعیتتاریخ ایجادعملیات
{{ $row->id }}{{ $row->title }}{{ $row->status->value }}{{ $row->created_at }} 36 | 37 | 38 | @can('deletes_index') 39 | 40 | @endcan 41 |
51 | {!! $projects->links() !!} 52 |
53 | -------------------------------------------------------------------------------- /resources/views/livewire/support/groups/create.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | - ایجاد گروه جدید 4 | 5 |
6 |
7 |
8 |
9 |
10 | 11 | 12 |
@error('name') {{ $message }} @enderror
13 |
14 |
15 | 16 | 22 |
@error('type') {{ $message }} @enderror
23 |
24 |
25 | 26 | 28 |
@error('pic') {{ $message }} @enderror
29 |
30 |
31 |
32 | @if( $logo ) 33 | 34 | @endif 35 |
36 |
37 |
38 | 39 |
40 |
41 |
42 |
43 |
44 |
45 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://getcomposer.org/schema.json", 3 | "name": "laravel/laravel", 4 | "type": "project", 5 | "description": "The skeleton application for the Laravel framework.", 6 | "keywords": ["laravel", "framework"], 7 | "license": "MIT", 8 | "require": { 9 | "php": "^8.2", 10 | "jantinnerezo/livewire-alert": "^3.0", 11 | "laravel/framework": "^11.31", 12 | "laravel/tinker": "^2.9", 13 | "laravel/ui": "^4.6", 14 | "livewire/livewire": "^3.5" 15 | }, 16 | "require-dev": { 17 | "fakerphp/faker": "^1.23", 18 | "laravel/pail": "^1.1", 19 | "laravel/pint": "^1.13", 20 | "laravel/sail": "^1.26", 21 | "mockery/mockery": "^1.6", 22 | "nunomaduro/collision": "^8.1", 23 | "phpunit/phpunit": "^11.0.1" 24 | }, 25 | "autoload": { 26 | "psr-4": { 27 | "App\\": "app/", 28 | "Database\\Factories\\": "database/factories/", 29 | "Database\\Seeders\\": "database/seeders/" 30 | } 31 | }, 32 | "autoload-dev": { 33 | "psr-4": { 34 | "Tests\\": "tests/" 35 | } 36 | }, 37 | "scripts": { 38 | "post-autoload-dump": [ 39 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 40 | "@php artisan package:discover --ansi" 41 | ], 42 | "post-update-cmd": [ 43 | "@php artisan vendor:publish --tag=laravel-assets --ansi --force" 44 | ], 45 | "post-root-package-install": [ 46 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 47 | ], 48 | "post-create-project-cmd": [ 49 | "@php artisan key:generate --ansi", 50 | "@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"", 51 | "@php artisan migrate --graceful --ansi" 52 | ], 53 | "dev": [ 54 | "Composer\\Config::disableProcessTimeout", 55 | "npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185,#fdba74\" \"php artisan serve\" \"php artisan queue:listen --tries=1\" \"php artisan pail --timeout=0\" \"npm run dev\" --names=server,queue,logs,vite" 56 | ] 57 | }, 58 | "extra": { 59 | "laravel": { 60 | "dont-discover": [] 61 | } 62 | }, 63 | "config": { 64 | "optimize-autoloader": true, 65 | "preferred-install": "dist", 66 | "sort-packages": true, 67 | "allow-plugins": { 68 | "pestphp/pest-plugin": true, 69 | "php-http/discovery": true 70 | } 71 | }, 72 | "minimum-stability": "stable", 73 | "prefer-stable": true 74 | } 75 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | env('FILESYSTEM_DISK', 'local'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Filesystem Disks 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Below you may configure as many filesystem disks as necessary, and you 24 | | may even configure multiple disks for the same driver. Examples for 25 | | most supported storage drivers are configured here for reference. 26 | | 27 | | Supported drivers: "local", "ftp", "sftp", "s3" 28 | | 29 | */ 30 | 31 | 'disks' => [ 32 | 33 | 'local' => [ 34 | 'driver' => 'local', 35 | 'root' => storage_path('app/private'), 36 | 'serve' => true, 37 | 'throw' => false, 38 | ], 39 | 40 | 'public' => [ 41 | 'driver' => 'local', 42 | 'root' => storage_path('app/public'), 43 | 'url' => env('APP_URL').'/storage', 44 | 'visibility' => 'public', 45 | 'throw' => false, 46 | ], 47 | 48 | 's3' => [ 49 | 'driver' => 's3', 50 | 'key' => env('AWS_ACCESS_KEY_ID'), 51 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 52 | 'region' => env('AWS_DEFAULT_REGION'), 53 | 'bucket' => env('AWS_BUCKET'), 54 | 'url' => env('AWS_URL'), 55 | 'endpoint' => env('AWS_ENDPOINT'), 56 | 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false), 57 | 'throw' => false, 58 | ], 59 | 60 | ], 61 | 62 | /* 63 | |-------------------------------------------------------------------------- 64 | | Symbolic Links 65 | |-------------------------------------------------------------------------- 66 | | 67 | | Here you may configure the symbolic links that will be created when the 68 | | `storage:link` Artisan command is executed. The array keys should be 69 | | the locations of the links and the values should be their targets. 70 | | 71 | */ 72 | 73 | 'links' => [ 74 | public_path('storage') => storage_path('app/public'), 75 | ], 76 | 77 | ]; 78 | -------------------------------------------------------------------------------- /resources/views/livewire/support/projects/show.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | - توضیحات پروژه {{$project->name}} 4 | 5 | @if($project) 6 | 7 |
8 |
9 |
10 |
نام پروژه : {{$project->title}}
11 |
12 |
13 |
14 |
15 |
ایجاد کننده : {{$project->user->name}}
16 |
17 |
18 |
19 |
20 |
گیرنده : {{$project->owner->name}}
21 |
22 |
23 |
24 |
25 |
وضعیت :{{$project->status->value}}
26 |
27 |
28 |
29 |
30 |
31 | توضیحات پروژه : 32 |
33 | {{ $project->description }} 34 |
35 | منتشر شده : {{ $project->created_at->format('M d, Y') }} 36 |
37 |
38 |
39 |
40 |
41 |
42 | عکس پروژه : 43 | 48 |
49 |
50 |
51 |
52 | برگشت به صفحه پروژه 53 | @else 54 |

پستی منتشر نشده است

55 | @endif 56 |
57 | -------------------------------------------------------------------------------- /resources/views/livewire/support/users/index.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | - کاربران 4 | 5 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | @if($readyToLoad) 28 | 29 | @foreach($users as $row) 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 43 | 44 | @endforeach 45 | 46 | @else 47 | 50 | @endif 51 |
شناسهعکسنام و نام خانوادگیایمیلسمتموبایلتاریخ ایجادعملیات
{{ $row->id }}{{ $row->name }}{{ $row->email }}{{ $row->position }}{{ $row->mobile }}{{ $row->created_at }} 39 | 40 | 41 | 42 |
52 | {!! $users->links() !!} 53 |
54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /app/Livewire/Support/Users/Create.php: -------------------------------------------------------------------------------- 1 | validateOnly($name); 48 | } 49 | 50 | public function saveUser(): void 51 | { 52 | $this->validate(); 53 | 54 | $user = User::query()->create([ 55 | 'name' => $this->name, 56 | 'email' => $this->email, 57 | 'mobile' => $this->mobile, 58 | 'phone' => $this->phone, 59 | 'gender' => $this->gender, 60 | 'position' => $this->position, 61 | 'birthday' => $this->birthday, 62 | 'role_id' => $this->role_id, 63 | 'group_id' => $this->group_id, 64 | 'imei' => $this->imei, 65 | 'is_admin' => 0, 66 | 'is_staff' => 1, 67 | 'password' => Hash::make($this->password), 68 | ]); 69 | 70 | if ($this->pic) { 71 | $user->update([ 72 | 'pic' => $this->uploadImage() 73 | ]); 74 | } 75 | 76 | $this->dispatch('toastr:success', message: 'کاربر مورد نظر با موفقیت ایجاد شد'); 77 | $this->redirectRoute('users.index'); 78 | } 79 | public function uploadImage(): string 80 | { 81 | $year = now()->year; $month = now()->month; $directory = "users/$year/$month"; 82 | $name= $this->pic->getClientOriginalName(); $this->pic->storeAs($directory,$name); 83 | return "$directory/$name"; 84 | } 85 | public function render(): \Illuminate\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|\Illuminate\View\View 86 | { 87 | return view('livewire.support.users.create'); 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 | 4 | 5 | TaskSquad Logo 6 | 7 |

8 | 9 | ## TaskSquad 10 | 11 | A Tasks Management Project Based on Laravel and Livewire 12 | 13 | ## How to use 14 | 15 | ```bash 16 | git clone https://github.com/Rayiumir/TaskSquad.git 17 | cd TaskSquad/ 18 | composer install 19 | cp .env.example .env 20 | php artisan migrate --seed 21 | php artisan key:generate 22 | php artisan serve 23 | ``` 24 | 25 | ## ScreenShots 26 | 27 | ### Admin 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 43 | 46 | 49 | 52 | 53 | 54 |
Admin IndexUsersGroupsRoles
41 | Admin Index 42 | 44 | Users 45 | 47 | Groups 48 | 50 | Roles 51 |
55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 68 | 71 | 74 | 75 | 76 |
PermissionsTasksProjects
66 | Permissions 67 | 69 | Tasks 70 | 72 | Projects 73 |
77 | 78 | ### User 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 93 | 94 | 97 | 100 | 101 | 102 |
User IndexTasksProjects
91 | Admin Index 92 | 95 | Tasks 96 | 98 | Projects 99 |
103 | -------------------------------------------------------------------------------- /resources/views/livewire/support/tasks/show.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | - توضیحات وظیفه {{$task->subject}} 4 | 5 | @if($task) 6 | 7 |
8 |
9 |
10 |
نام وظیفه : {{$task->title}}
11 |
12 |
13 |
14 |
15 |
نوع : 16 | @if($task->type_id == 1) 17 | وظیفه 18 | @else 19 | نامه 20 | @endif 21 |
22 |
23 |
24 |
25 |
26 |
اولویت : 27 | @if($task->priority_id == 1) 28 | عادی 29 | @elseif($task->priority_id == 2) 30 | لحظه ای 31 | @elseif($task->priority_id == 3) 32 | آنی 33 | @endif 34 |
35 |
36 |
37 |
38 |
39 |
ایجاد کننده : {{$task->user->name}}
40 |
41 |
42 |
43 |
44 |
گیرنده : {{$task->owner->name}}
45 |
46 |
47 |
48 |
49 |
وضعیت :{{$task->status->value}}
50 |
51 |
52 |
53 |
54 |
55 | توضیحات پروژه : 56 |
57 | {!! $task->description !!} 58 |
59 | منتشر شده : {{ $task->created_at->format('M d, Y') }} 60 |
61 |
62 |
63 |
64 | برگشت به صفحه وظیفه ها 65 | @else 66 |

پستی منتشر نشده است

67 | @endif 68 |
69 | -------------------------------------------------------------------------------- /public/css/admin/style.css: -------------------------------------------------------------------------------- 1 | 2 | @import url('https://fonts.googleapis.com/css2?family=Vazirmatn&display=swap'); 3 | 4 | body{ 5 | font-family: Vazirmatn; 6 | letter-spacing: 0; 7 | text-rendering: optimizeLegibility; 8 | font-weight: 300; 9 | color: #212529; 10 | font-size: 1rem; 11 | background-color: #e8e8e8; 12 | line-height: 2; 13 | word-wrap: break-word; 14 | -webkit-font-smoothing: antialiased; 15 | -moz-osx-font-smoothing: grayscale; 16 | } 17 | #wrapper { 18 | overflow-x: hidden; 19 | } 20 | 21 | #sidebar-wrapper { 22 | min-height: 100vh; 23 | margin-right: -15rem; 24 | -webkit-transition: margin .25s ease-out; 25 | -moz-transition: margin .25s ease-out; 26 | -o-transition: margin .25s ease-out; 27 | transition: margin .25s ease-out; 28 | } 29 | 30 | #sidebar-wrapper .sidebar-heading { 31 | padding: 0.875rem 1.25rem; 32 | font-size: 1.2rem; 33 | } 34 | 35 | #sidebar-wrapper .list-group { 36 | width: 15rem; 37 | } 38 | 39 | #page-content-wrapper { 40 | min-width: 100vw; 41 | } 42 | 43 | #wrapper.toggled #sidebar-wrapper { 44 | margin-right: 0; 45 | } 46 | 47 | @media (min-width: 768px) { 48 | #sidebar-wrapper { 49 | margin-right: 0; 50 | } 51 | 52 | #page-content-wrapper { 53 | min-width: 0; 54 | width: 100%; 55 | } 56 | 57 | #wrapper.toggled #sidebar-wrapper { 58 | margin-right: -15rem; 59 | } 60 | } 61 | #menu-toggle { 62 | margin-right: 15px; 63 | } 64 | 65 | summary { 66 | display: block; 67 | } 68 | summary::-webkit-details-marker{ 69 | display: none; 70 | } 71 | 72 | .p-section-faq__item:nth-of-type(n+2) { 73 | margin-top: 32px; 74 | } 75 | 76 | .title { 77 | display: flex; 78 | flex-direction: row; 79 | justify-content: space-between; 80 | align-items: center; 81 | padding: 8px 16px; 82 | color: #212529; 83 | cursor: pointer; 84 | } 85 | .icon { 86 | display: block; 87 | flex-shrink: 0; 88 | position: relative; 89 | width: 16px; 90 | transform-origin: center; 91 | } 92 | .icon::after { 93 | content: ""; 94 | position: absolute; 95 | display: block; 96 | width: 10px; 97 | height: 10px; 98 | transition: transform .3s; 99 | transform: translateY(-80%) rotate(45deg); 100 | border-right: 2px solid #212529; 101 | border-bottom: 2px solid #212529; 102 | } 103 | 104 | .is-opened .icon::after { 105 | transform: translateY(-25%) rotate(-135deg); 106 | } 107 | 108 | .content { 109 | overflow: hidden; 110 | } 111 | 112 | ul li{ 113 | list-style: none; 114 | width: 100%; 115 | } 116 | 117 | .alert { 118 | position: fixed; 119 | top: 1rem; 120 | right: 1rem; 121 | padding: 1rem; 122 | border-radius: 0.25rem; 123 | box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); 124 | } 125 | 126 | .alert-success { 127 | background-color: #d1fae5; 128 | color: #065f46; 129 | } 130 | 131 | .alert-error { 132 | background-color: #fee2e2; 133 | color: #991b1b; 134 | } 135 | 136 | .alert-warning { 137 | background-color: #fef3c7; 138 | color: #92400e; 139 | } 140 | 141 | 142 | -------------------------------------------------------------------------------- /resources/views/auth/passwords/reset.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
9 | 10 |
11 |
12 |
13 | @csrf 14 | 15 | 16 | 17 |
18 | 19 | 20 |
21 | 22 | 23 | @error('email') 24 | 25 | {{ $message }} 26 | 27 | @enderror 28 |
29 |
30 | 31 |
32 | 33 | 34 |
35 | 36 | 37 | @error('password') 38 | 39 | {{ $message }} 40 | 41 | @enderror 42 |
43 |
44 | 45 |
46 | 47 | 48 |
49 | 50 |
51 |
52 | 53 |
54 |
55 | 58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 | @endsection 67 | -------------------------------------------------------------------------------- /app/Livewire/Support/Users/Edit.php: -------------------------------------------------------------------------------- 1 | 'required', 30 | 'email' => 'nullable', 31 | 'birthday' => 'nullable', 32 | 'group_id' => 'nullable', 33 | 'mobile' => 'nullable', 34 | 'phone' => 'nullable', 35 | 'gender' => 'nullable', 36 | 'role_id' => 'nullable', 37 | 'imei' => 'nullable', 38 | 'position' => 'nullable', 39 | 'pic' => 'nullable', 40 | ]; 41 | 42 | public function mount(User $user): void 43 | { 44 | $this->user = $user; 45 | $this->name = $user->name; 46 | $this->email = $user->email; 47 | $this->mobile = $user->mobile; 48 | $this->phone = $user->phone; 49 | $this->gender = $user->gender; 50 | $this->position = $user->position; 51 | $this->birthday = $user->birthday; 52 | $this->imei = $user->imei; 53 | $this->role_id = $user->role_id; 54 | $this->group_id = $user->group_id; 55 | } 56 | 57 | public function updated($name): void 58 | { 59 | $this->validateOnly($name); 60 | } 61 | 62 | public function editUser(): void 63 | { 64 | $this->validate(); 65 | 66 | if ($this->pic) { 67 | $this->user->update([ 68 | 'pic' => $this->uploadImage() 69 | ]); 70 | } 71 | 72 | $this->user->update([ 73 | 'name' => $this->name, 74 | 'email' => $this->email, 75 | 'mobile' => $this->mobile, 76 | 'phone' => $this->phone, 77 | 'gender' => $this->gender, 78 | 'position' => $this->position, 79 | 'birthday' => $this->birthday, 80 | 'imei' => $this->imei, 81 | 'password' => $this->password ? Hash::make($this->password) : $this->user->password, 82 | 'role_id' => $this->role_id, 83 | 'group_id' => $this->group_id, 84 | ]); 85 | 86 | $this->dispatch('toastr:success', message: 'کاربر با موفقیت ویرایش شد'); 87 | $this->redirectRoute('users.index'); 88 | } 89 | 90 | public function uploadImage(): string 91 | { 92 | $year = now()->year; 93 | $month = now()->month; 94 | $directory = "users/$year/$month"; 95 | $name= $this->pic->getClientOriginalName(); 96 | $this->pic->storeAs($directory,$name); 97 | return "$directory/$name"; 98 | } 99 | public function render(User $user): \Illuminate\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|\Illuminate\View\View 100 | { 101 | return view('livewire.support.users.edit', compact('user')); 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /app/Models/User.php: -------------------------------------------------------------------------------- 1 | */ 14 | 15 | use HasFactory, Notifiable, SoftDeletes; 16 | 17 | 18 | /** 19 | * The attributes that are mass assignable. 20 | * 21 | * @var array 22 | */ 23 | protected $fillable = [ 24 | 'name', 25 | 'email', 26 | 'password', 27 | 'is_admin', 28 | 'is_staff', 29 | 'birthday', 30 | 'group_id', 31 | 'mobile', 32 | 'phone', 33 | 'gender', 34 | 'role_id', 35 | 'imei', 36 | 'pic', 37 | 'position' 38 | ]; 39 | 40 | /** 41 | * The attributes that should be hidden for serialization. 42 | * 43 | * @var array 44 | */ 45 | protected $hidden = [ 46 | 'password', 47 | 'remember_token', 48 | ]; 49 | 50 | /** 51 | * Get the attributes that should be cast. 52 | * 53 | * @return array 54 | */ 55 | protected function casts(): array 56 | { 57 | return [ 58 | 'email_verified_at' => 'datetime', 59 | 'password' => 'hashed', 60 | ]; 61 | } 62 | 63 | public function permissions(): \Illuminate\Database\Eloquent\Relations\BelongsToMany 64 | { 65 | return $this->belongsToMany(Permissions::class, 'permissions_user', 'user_id', 'permission_id'); 66 | } 67 | 68 | public function hasPermission($permission): bool 69 | { 70 | return $this->permissions->contains('title', $permission->title); 71 | } 72 | 73 | public function givePermission($permission): false|array 74 | { 75 | if (is_string($permission)) { 76 | $permission = Permissions::where('title', $permission)->first(); 77 | } 78 | 79 | if (!$permission) { 80 | return false; 81 | } 82 | 83 | return $this->permissions()->syncWithoutDetaching($permission); 84 | } 85 | 86 | public function revokePermission($permission): int 87 | { 88 | if (is_string($permission)) { 89 | $permission = Permissions::where('title', $permission)->first(); 90 | } 91 | 92 | return $this->permissions()->detach($permission); 93 | } 94 | 95 | 96 | // public function isAdmin() 97 | // { 98 | // return $this->is_admin; 99 | // } 100 | 101 | public function isAdmin(): bool 102 | { 103 | return $this->roles()->where('title', 'isAdmin')->count() > 0; 104 | } 105 | 106 | public function isStaff() 107 | { 108 | return $this->is_staff; 109 | } 110 | 111 | public function hasRole($roles) 112 | { 113 | return !! $roles->intersect($this->roles)->all(); 114 | } 115 | 116 | public function roles(): \Illuminate\Database\Eloquent\Relations\BelongsToMany 117 | { 118 | return $this->belongsToMany(Roles::class, 'role_user', 'user_id', 'role_id'); // Adjust Role class namespace if necessary 119 | } 120 | 121 | } 122 | -------------------------------------------------------------------------------- /routes/web.php: -------------------------------------------------------------------------------- 1 | name('home'); 13 | 14 | Route::group(['prefix' => 'admin', 'middleware' => 'auth'], static function ($router){ 15 | 16 | // Admin 17 | 18 | $router->get('/', \App\Livewire\Support\Admin\Index::class)->name('admin.index'); 19 | $router->get('/logout', [\App\Http\Controllers\AdminController::class, 'logout'])->name('admin.logout'); 20 | 21 | // Users 22 | 23 | $router->get('/users', \App\Livewire\Support\Users\Index::class)->name('users.index')->middleware('can:users_index'); 24 | $router->get('/users/create', \App\Livewire\Support\Users\Create::class)->name('users.create')->middleware('can:users_index'); 25 | $router->get('/users/user/{user}', \App\Livewire\Support\Users\Edit::class)->name('users.edit')->middleware('can:users_index'); 26 | $router->get('/users/trash', \App\Livewire\Support\Users\Trash::class)->name('users.trash')->middleware('can:users_index'); 27 | $router->get('/users/{user}/permissions', \App\Livewire\Support\Users\PermissionUser::class)->name('permissionUser.create')->middleware('can:users_index'); 28 | 29 | // Groups 30 | 31 | $router->get('/groups', \App\Livewire\Support\Groups\Index::class)->name('groups.index')->middleware('can:groups_index'); 32 | $router->get('/groups/create', \App\Livewire\Support\Groups\Create::class)->name('groups.create')->middleware('can:groups_index', 'can:creates_index'); 33 | 34 | // Roles 35 | 36 | $router->get('/roles', \App\Livewire\Support\Roles\Index::class)->name('roles.index')->middleware('can:roles_index'); 37 | $router->get('/roles/create', \App\Livewire\Support\Roles\Create::class)->name('roles.create')->middleware('can:roles_index', 'can:creates_index'); 38 | 39 | // Permissions 40 | 41 | $router->get('/permissions', \App\Livewire\Support\Permissions\Index::class)->name('permissions.index')->middleware('can:permissions_index');; 42 | $router->get('/permissions/create', \App\Livewire\Support\Permissions\Create::class)->name('permissions.create')->middleware('can:permissions_index', 'can:creates_index'); 43 | 44 | // Tasks 45 | 46 | $router->get('/tasks', \App\Livewire\Support\Tasks\Index::class)->name('tasks.index')->middleware('can:tasks_index'); 47 | $router->get('/tasks/create', \App\Livewire\Support\Tasks\Create::class)->name('tasks.create')->middleware('can:tasks_index', 'can:creates_index'); 48 | $router->get('/tasks/{id}/status', \App\Livewire\Support\Tasks\Status::class)->name('tasks.status')->middleware('can:tasks_index'); 49 | $router->get('/tasks/{id}/show', \App\Livewire\Support\Tasks\Show::class)->name('tasks.show')->middleware('can:tasks_index'); 50 | 51 | // Projects 52 | 53 | $router->get('/projects', \App\Livewire\Support\Projects\Index::class)->name('projects.index')->middleware('can:projects_index'); 54 | $router->get('/projects/create', \App\Livewire\Support\Projects\Create::class)->name('projects.create')->middleware('can:projects_index', 'can:creates_index'); 55 | $router->get('/projects/{id}/status', \App\Livewire\Support\Projects\Status::class)->name('projects.status')->middleware('can:projects_index'); 56 | $router->get('/projects/{id}/show', \App\Livewire\Support\Projects\Show::class)->name('projects.show')->middleware('can:projects_index'); 57 | }); 58 | -------------------------------------------------------------------------------- /resources/views/livewire/support/admin/inc/sidebar.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 46 | 47 | -------------------------------------------------------------------------------- /resources/views/livewire/support/projects/create.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | - ایجاد پروژه جدید 4 | 5 |
6 |
7 |
8 |
9 |
10 | 11 | 12 |
@error('title') {{ $message }} @enderror
13 |
14 | 15 |
16 | 17 | 23 | @error('user_id')
{{ $message }}
@enderror 24 |
25 |
26 | 27 | 33 | @error('owner_id')
{{ $message }}
@enderror 34 |
35 |
36 | 37 | 38 |
@error('description') {{ $message }} @enderror
39 |
40 |
41 | 42 | 44 |
@error('pic') {{ $message }} @enderror
45 |
46 |
47 |
48 | @if( $pic ) 49 | 50 | @endif 51 |
52 |
53 |
54 | 55 |
56 |
57 |
58 |
59 |
60 |
61 | -------------------------------------------------------------------------------- /resources/views/auth/login.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
9 |
10 | 11 |
12 |
13 | @csrf 14 |
15 | 16 | 17 |
18 | 19 | 20 | @error('email') 21 | 22 | {{ $message }} 23 | 24 | @enderror 25 |
26 |
27 | 28 |
29 | 30 | 31 |
32 | 33 | 34 | @error('password') 35 | 36 | {{ $message }} 37 | 38 | @enderror 39 |
40 |
41 | 42 |
43 |
44 |
45 | 46 | 47 | 50 |
51 |
52 |
53 | 54 |
55 |
56 | 59 | 60 | @if (Route::has('password.request')) 61 | 62 | {{ __('Forgot Your Password?') }} 63 | 64 | @endif 65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 | @endsection 74 | -------------------------------------------------------------------------------- /resources/views/livewire/support/admin/index.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 | @if(!Auth::user()->isAdmin()) 4 |
5 |
6 |
7 |
8 | 9 |

وظیفه ها : {{ \App\Models\Task::where('owner_id', Auth::id())->count() }}

10 |
11 |
12 |
13 |
14 |
15 |
16 | 17 |

پروژه ها : {{ \App\Models\Project::where('owner_id', Auth::id())->count() }}

18 |
19 |
20 |
21 |
22 | @else 23 |
24 |
25 |
26 |
27 | 28 |

کاربران : {{ \App\Models\User::count() }}

29 |
30 |
31 |
32 |
33 |
34 |
35 | 36 |

گروه ها : {{ \App\Models\Groups::count() }}

37 |
38 |
39 |
40 |
41 |
42 |
43 | 44 |

مقام ها : {{ \App\Models\Roles::count() }}

45 |
46 |
47 |
48 |
49 |
50 |
51 | 52 |

دسترسی ها : {{ \App\Models\Permissions::count() }}

53 |
54 |
55 |
56 |
57 |
58 |
59 | 60 |

وظیفه ها : {{ \App\Models\Task::count() }}

61 |
62 |
63 |
64 |
65 |
66 |
67 | 68 |

پروژه ها : {{ \App\Models\Project::count() }}

69 |
70 |
71 |
72 |
73 | @endif 74 |
75 |
76 | -------------------------------------------------------------------------------- /config/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_STORE', 'database'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Cache Stores 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the cache "stores" for your application as 26 | | well as their drivers. You may even define multiple stores for the 27 | | same cache driver to group types of items stored in your caches. 28 | | 29 | | Supported drivers: "array", "database", "file", "memcached", 30 | | "redis", "dynamodb", "octane", "null" 31 | | 32 | */ 33 | 34 | 'stores' => [ 35 | 36 | 'array' => [ 37 | 'driver' => 'array', 38 | 'serialize' => false, 39 | ], 40 | 41 | 'database' => [ 42 | 'driver' => 'database', 43 | 'connection' => env('DB_CACHE_CONNECTION'), 44 | 'table' => env('DB_CACHE_TABLE', 'cache'), 45 | 'lock_connection' => env('DB_CACHE_LOCK_CONNECTION'), 46 | 'lock_table' => env('DB_CACHE_LOCK_TABLE'), 47 | ], 48 | 49 | 'file' => [ 50 | 'driver' => 'file', 51 | 'path' => storage_path('framework/cache/data'), 52 | 'lock_path' => storage_path('framework/cache/data'), 53 | ], 54 | 55 | 'memcached' => [ 56 | 'driver' => 'memcached', 57 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), 58 | 'sasl' => [ 59 | env('MEMCACHED_USERNAME'), 60 | env('MEMCACHED_PASSWORD'), 61 | ], 62 | 'options' => [ 63 | // Memcached::OPT_CONNECT_TIMEOUT => 2000, 64 | ], 65 | 'servers' => [ 66 | [ 67 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 68 | 'port' => env('MEMCACHED_PORT', 11211), 69 | 'weight' => 100, 70 | ], 71 | ], 72 | ], 73 | 74 | 'redis' => [ 75 | 'driver' => 'redis', 76 | 'connection' => env('REDIS_CACHE_CONNECTION', 'cache'), 77 | 'lock_connection' => env('REDIS_CACHE_LOCK_CONNECTION', 'default'), 78 | ], 79 | 80 | 'dynamodb' => [ 81 | 'driver' => 'dynamodb', 82 | 'key' => env('AWS_ACCESS_KEY_ID'), 83 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 84 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 85 | 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), 86 | 'endpoint' => env('DYNAMODB_ENDPOINT'), 87 | ], 88 | 89 | 'octane' => [ 90 | 'driver' => 'octane', 91 | ], 92 | 93 | ], 94 | 95 | /* 96 | |-------------------------------------------------------------------------- 97 | | Cache Key Prefix 98 | |-------------------------------------------------------------------------- 99 | | 100 | | When utilizing the APC, database, memcached, Redis, and DynamoDB cache 101 | | stores, there might be other applications using the same cache. For 102 | | that reason, you may prefix every cache key to avoid collisions. 103 | | 104 | */ 105 | 106 | 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'), 107 | 108 | ]; 109 | -------------------------------------------------------------------------------- /resources/views/auth/register.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
9 |
10 | 11 |
12 |
13 | @csrf 14 | 15 |
16 | 17 | 18 |
19 | 20 | 21 | @error('name') 22 | 23 | {{ $message }} 24 | 25 | @enderror 26 |
27 |
28 | 29 |
30 | 31 | 32 |
33 | 34 | 35 | @error('email') 36 | 37 | {{ $message }} 38 | 39 | @enderror 40 |
41 |
42 | 43 |
44 | 45 | 46 |
47 | 48 | 49 | @error('password') 50 | 51 | {{ $message }} 52 | 53 | @enderror 54 |
55 |
56 | 57 |
58 | 59 | 60 |
61 | 62 |
63 |
64 | 65 |
66 |
67 | 70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 | @endsection 79 | -------------------------------------------------------------------------------- /config/mail.php: -------------------------------------------------------------------------------- 1 | env('MAIL_MAILER', 'log'), 18 | 19 | /* 20 | |-------------------------------------------------------------------------- 21 | | Mailer Configurations 22 | |-------------------------------------------------------------------------- 23 | | 24 | | Here you may configure all of the mailers used by your application plus 25 | | their respective settings. Several examples have been configured for 26 | | you and you are free to add your own as your application requires. 27 | | 28 | | Laravel supports a variety of mail "transport" drivers that can be used 29 | | when delivering an email. You may specify which one you're using for 30 | | your mailers below. You may also add additional mailers if needed. 31 | | 32 | | Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2", 33 | | "postmark", "resend", "log", "array", 34 | | "failover", "roundrobin" 35 | | 36 | */ 37 | 38 | 'mailers' => [ 39 | 40 | 'smtp' => [ 41 | 'transport' => 'smtp', 42 | 'url' => env('MAIL_URL'), 43 | 'host' => env('MAIL_HOST', '127.0.0.1'), 44 | 'port' => env('MAIL_PORT', 2525), 45 | 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 46 | 'username' => env('MAIL_USERNAME'), 47 | 'password' => env('MAIL_PASSWORD'), 48 | 'timeout' => null, 49 | 'local_domain' => env('MAIL_EHLO_DOMAIN', parse_url(env('APP_URL', 'http://localhost'), PHP_URL_HOST)), 50 | ], 51 | 52 | 'ses' => [ 53 | 'transport' => 'ses', 54 | ], 55 | 56 | 'postmark' => [ 57 | 'transport' => 'postmark', 58 | // 'message_stream_id' => env('POSTMARK_MESSAGE_STREAM_ID'), 59 | // 'client' => [ 60 | // 'timeout' => 5, 61 | // ], 62 | ], 63 | 64 | 'resend' => [ 65 | 'transport' => 'resend', 66 | ], 67 | 68 | 'sendmail' => [ 69 | 'transport' => 'sendmail', 70 | 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'), 71 | ], 72 | 73 | 'log' => [ 74 | 'transport' => 'log', 75 | 'channel' => env('MAIL_LOG_CHANNEL'), 76 | ], 77 | 78 | 'array' => [ 79 | 'transport' => 'array', 80 | ], 81 | 82 | 'failover' => [ 83 | 'transport' => 'failover', 84 | 'mailers' => [ 85 | 'smtp', 86 | 'log', 87 | ], 88 | ], 89 | 90 | 'roundrobin' => [ 91 | 'transport' => 'roundrobin', 92 | 'mailers' => [ 93 | 'ses', 94 | 'postmark', 95 | ], 96 | ], 97 | 98 | ], 99 | 100 | /* 101 | |-------------------------------------------------------------------------- 102 | | Global "From" Address 103 | |-------------------------------------------------------------------------- 104 | | 105 | | You may wish for all emails sent by your application to be sent from 106 | | the same address. Here you may specify a name and address that is 107 | | used globally for all emails that are sent by your application. 108 | | 109 | */ 110 | 111 | 'from' => [ 112 | 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), 113 | 'name' => env('MAIL_FROM_NAME', 'Example'), 114 | ], 115 | 116 | ]; 117 | -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_CONNECTION', 'database'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Queue Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure the connection options for every queue backend 24 | | used by your application. An example configuration is provided for 25 | | each backend supported by Laravel. You're also free to add more. 26 | | 27 | | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'sync' => [ 34 | 'driver' => 'sync', 35 | ], 36 | 37 | 'database' => [ 38 | 'driver' => 'database', 39 | 'connection' => env('DB_QUEUE_CONNECTION'), 40 | 'table' => env('DB_QUEUE_TABLE', 'jobs'), 41 | 'queue' => env('DB_QUEUE', 'default'), 42 | 'retry_after' => (int) env('DB_QUEUE_RETRY_AFTER', 90), 43 | 'after_commit' => false, 44 | ], 45 | 46 | 'beanstalkd' => [ 47 | 'driver' => 'beanstalkd', 48 | 'host' => env('BEANSTALKD_QUEUE_HOST', 'localhost'), 49 | 'queue' => env('BEANSTALKD_QUEUE', 'default'), 50 | 'retry_after' => (int) env('BEANSTALKD_QUEUE_RETRY_AFTER', 90), 51 | 'block_for' => 0, 52 | 'after_commit' => false, 53 | ], 54 | 55 | 'sqs' => [ 56 | 'driver' => 'sqs', 57 | 'key' => env('AWS_ACCESS_KEY_ID'), 58 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 59 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), 60 | 'queue' => env('SQS_QUEUE', 'default'), 61 | 'suffix' => env('SQS_SUFFIX'), 62 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 63 | 'after_commit' => false, 64 | ], 65 | 66 | 'redis' => [ 67 | 'driver' => 'redis', 68 | 'connection' => env('REDIS_QUEUE_CONNECTION', 'default'), 69 | 'queue' => env('REDIS_QUEUE', 'default'), 70 | 'retry_after' => (int) env('REDIS_QUEUE_RETRY_AFTER', 90), 71 | 'block_for' => null, 72 | 'after_commit' => false, 73 | ], 74 | 75 | ], 76 | 77 | /* 78 | |-------------------------------------------------------------------------- 79 | | Job Batching 80 | |-------------------------------------------------------------------------- 81 | | 82 | | The following options configure the database and table that store job 83 | | batching information. These options can be updated to any database 84 | | connection and table which has been defined by your application. 85 | | 86 | */ 87 | 88 | 'batching' => [ 89 | 'database' => env('DB_CONNECTION', 'sqlite'), 90 | 'table' => 'job_batches', 91 | ], 92 | 93 | /* 94 | |-------------------------------------------------------------------------- 95 | | Failed Queue Jobs 96 | |-------------------------------------------------------------------------- 97 | | 98 | | These options configure the behavior of failed queue job logging so you 99 | | can control how and where failed jobs are stored. Laravel ships with 100 | | support for storing failed jobs in a simple file or in a database. 101 | | 102 | | Supported drivers: "database-uuids", "dynamodb", "file", "null" 103 | | 104 | */ 105 | 106 | 'failed' => [ 107 | 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), 108 | 'database' => env('DB_CONNECTION', 'sqlite'), 109 | 'table' => 'failed_jobs', 110 | ], 111 | 112 | ]; 113 | -------------------------------------------------------------------------------- /resources/views/livewire/support/tasks/create.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | - ایجاد وظایف جدید 4 | 5 |
6 |
7 |
8 |
9 | 10 |
11 | 12 | 13 | @error('title')
{{ $message }}
@enderror 14 |
15 | 16 | 17 |
18 | 19 | 24 | @error('type_id')
{{ $message }}
@enderror 25 |
26 | 27 | 28 |
29 | 30 | 36 | @error('user_id')
{{ $message }}
@enderror 37 |
38 | 39 | 40 |
41 | 42 | 48 | @error('priority_id')
{{ $message }}
@enderror 49 |
50 | 51 |
52 | 53 | 59 | @error('owner_id')
{{ $message }}
@enderror 60 |
61 | 62 | 63 |
64 | 65 | 66 | @error('description')
{{ $message }}
@enderror 67 |
68 | 69 | 70 |
71 | 72 |
73 |
74 |
75 |
76 |
77 |
78 | 79 | -------------------------------------------------------------------------------- /config/auth.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'guard' => env('AUTH_GUARD', 'web'), 18 | 'passwords' => env('AUTH_PASSWORD_BROKER', 'users'), 19 | ], 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Authentication Guards 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Next, you may define every authentication guard for your application. 27 | | Of course, a great default configuration has been defined for you 28 | | which utilizes session storage plus the Eloquent user provider. 29 | | 30 | | All authentication guards have a user provider, which defines how the 31 | | users are actually retrieved out of your database or other storage 32 | | system used by the application. Typically, Eloquent is utilized. 33 | | 34 | | Supported: "session" 35 | | 36 | */ 37 | 38 | 'guards' => [ 39 | 'web' => [ 40 | 'driver' => 'session', 41 | 'provider' => 'users', 42 | ], 43 | ], 44 | 45 | /* 46 | |-------------------------------------------------------------------------- 47 | | User Providers 48 | |-------------------------------------------------------------------------- 49 | | 50 | | All authentication guards have a user provider, which defines how the 51 | | users are actually retrieved out of your database or other storage 52 | | system used by the application. Typically, Eloquent is utilized. 53 | | 54 | | If you have multiple user tables or models you may configure multiple 55 | | providers to represent the model / table. These providers may then 56 | | be assigned to any extra authentication guards you have defined. 57 | | 58 | | Supported: "database", "eloquent" 59 | | 60 | */ 61 | 62 | 'providers' => [ 63 | 'users' => [ 64 | 'driver' => 'eloquent', 65 | 'model' => env('AUTH_MODEL', App\Models\User::class), 66 | ], 67 | 68 | // 'users' => [ 69 | // 'driver' => 'database', 70 | // 'table' => 'users', 71 | // ], 72 | ], 73 | 74 | /* 75 | |-------------------------------------------------------------------------- 76 | | Resetting Passwords 77 | |-------------------------------------------------------------------------- 78 | | 79 | | These configuration options specify the behavior of Laravel's password 80 | | reset functionality, including the table utilized for token storage 81 | | and the user provider that is invoked to actually retrieve users. 82 | | 83 | | The expiry time is the number of minutes that each reset token will be 84 | | considered valid. This security feature keeps tokens short-lived so 85 | | they have less time to be guessed. You may change this as needed. 86 | | 87 | | The throttle setting is the number of seconds a user must wait before 88 | | generating more password reset tokens. This prevents the user from 89 | | quickly generating a very large amount of password reset tokens. 90 | | 91 | */ 92 | 93 | 'passwords' => [ 94 | 'users' => [ 95 | 'provider' => 'users', 96 | 'table' => env('AUTH_PASSWORD_RESET_TOKEN_TABLE', 'password_reset_tokens'), 97 | 'expire' => 60, 98 | 'throttle' => 60, 99 | ], 100 | ], 101 | 102 | /* 103 | |-------------------------------------------------------------------------- 104 | | Password Confirmation Timeout 105 | |-------------------------------------------------------------------------- 106 | | 107 | | Here you may define the amount of seconds before a password confirmation 108 | | window expires and users are asked to re-enter their password via the 109 | | confirmation screen. By default, the timeout lasts for three hours. 110 | | 111 | */ 112 | 113 | 'password_timeout' => env('AUTH_PASSWORD_TIMEOUT', 10800), 114 | 115 | ]; 116 | -------------------------------------------------------------------------------- /config/app.php: -------------------------------------------------------------------------------- 1 | env('APP_NAME', 'Laravel'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Application Environment 21 | |-------------------------------------------------------------------------- 22 | | 23 | | This value determines the "environment" your application is currently 24 | | running in. This may determine how you prefer to configure various 25 | | services the application utilizes. Set this in your ".env" file. 26 | | 27 | */ 28 | 29 | 'env' => env('APP_ENV', 'production'), 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Application Debug Mode 34 | |-------------------------------------------------------------------------- 35 | | 36 | | When your application is in debug mode, detailed error messages with 37 | | stack traces will be shown on every error that occurs within your 38 | | application. If disabled, a simple generic error page is shown. 39 | | 40 | */ 41 | 42 | 'debug' => (bool) env('APP_DEBUG', false), 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Application URL 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This URL is used by the console to properly generate URLs when using 50 | | the Artisan command line tool. You should set this to the root of 51 | | the application so that it's available within Artisan commands. 52 | | 53 | */ 54 | 55 | 'url' => env('APP_URL', 'http://localhost'), 56 | 57 | /* 58 | |-------------------------------------------------------------------------- 59 | | Application Timezone 60 | |-------------------------------------------------------------------------- 61 | | 62 | | Here you may specify the default timezone for your application, which 63 | | will be used by the PHP date and date-time functions. The timezone 64 | | is set to "UTC" by default as it is suitable for most use cases. 65 | | 66 | */ 67 | 68 | 'timezone' => env('APP_TIMEZONE', 'UTC'), 69 | 70 | /* 71 | |-------------------------------------------------------------------------- 72 | | Application Locale Configuration 73 | |-------------------------------------------------------------------------- 74 | | 75 | | The application locale determines the default locale that will be used 76 | | by Laravel's translation / localization methods. This option can be 77 | | set to any locale for which you plan to have translation strings. 78 | | 79 | */ 80 | 81 | 'locale' => env('APP_LOCALE', 'en'), 82 | 83 | 'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'), 84 | 85 | 'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'), 86 | 87 | /* 88 | |-------------------------------------------------------------------------- 89 | | Encryption Key 90 | |-------------------------------------------------------------------------- 91 | | 92 | | This key is utilized by Laravel's encryption services and should be set 93 | | to a random, 32 character string to ensure that all encrypted values 94 | | are secure. You should do this prior to deploying the application. 95 | | 96 | */ 97 | 98 | 'cipher' => 'AES-256-CBC', 99 | 100 | 'key' => env('APP_KEY'), 101 | 102 | 'previous_keys' => [ 103 | ...array_filter( 104 | explode(',', env('APP_PREVIOUS_KEYS', '')) 105 | ), 106 | ], 107 | 108 | /* 109 | |-------------------------------------------------------------------------- 110 | | Maintenance Mode Driver 111 | |-------------------------------------------------------------------------- 112 | | 113 | | These configuration options determine the driver used to determine and 114 | | manage Laravel's "maintenance mode" status. The "cache" driver will 115 | | allow maintenance mode to be controlled across multiple machines. 116 | | 117 | | Supported drivers: "file", "cache" 118 | | 119 | */ 120 | 121 | 'maintenance' => [ 122 | 'driver' => env('APP_MAINTENANCE_DRIVER', 'file'), 123 | 'store' => env('APP_MAINTENANCE_STORE', 'database'), 124 | ], 125 | 126 | ]; 127 | -------------------------------------------------------------------------------- /config/logging.php: -------------------------------------------------------------------------------- 1 | env('LOG_CHANNEL', 'stack'), 22 | 23 | /* 24 | |-------------------------------------------------------------------------- 25 | | Deprecations Log Channel 26 | |-------------------------------------------------------------------------- 27 | | 28 | | This option controls the log channel that should be used to log warnings 29 | | regarding deprecated PHP and library features. This allows you to get 30 | | your application ready for upcoming major versions of dependencies. 31 | | 32 | */ 33 | 34 | 'deprecations' => [ 35 | 'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'), 36 | 'trace' => env('LOG_DEPRECATIONS_TRACE', false), 37 | ], 38 | 39 | /* 40 | |-------------------------------------------------------------------------- 41 | | Log Channels 42 | |-------------------------------------------------------------------------- 43 | | 44 | | Here you may configure the log channels for your application. Laravel 45 | | utilizes the Monolog PHP logging library, which includes a variety 46 | | of powerful log handlers and formatters that you're free to use. 47 | | 48 | | Available drivers: "single", "daily", "slack", "syslog", 49 | | "errorlog", "monolog", "custom", "stack" 50 | | 51 | */ 52 | 53 | 'channels' => [ 54 | 55 | 'stack' => [ 56 | 'driver' => 'stack', 57 | 'channels' => explode(',', env('LOG_STACK', 'single')), 58 | 'ignore_exceptions' => false, 59 | ], 60 | 61 | 'single' => [ 62 | 'driver' => 'single', 63 | 'path' => storage_path('logs/laravel.log'), 64 | 'level' => env('LOG_LEVEL', 'debug'), 65 | 'replace_placeholders' => true, 66 | ], 67 | 68 | 'daily' => [ 69 | 'driver' => 'daily', 70 | 'path' => storage_path('logs/laravel.log'), 71 | 'level' => env('LOG_LEVEL', 'debug'), 72 | 'days' => env('LOG_DAILY_DAYS', 14), 73 | 'replace_placeholders' => true, 74 | ], 75 | 76 | 'slack' => [ 77 | 'driver' => 'slack', 78 | 'url' => env('LOG_SLACK_WEBHOOK_URL'), 79 | 'username' => env('LOG_SLACK_USERNAME', 'Laravel Log'), 80 | 'emoji' => env('LOG_SLACK_EMOJI', ':boom:'), 81 | 'level' => env('LOG_LEVEL', 'critical'), 82 | 'replace_placeholders' => true, 83 | ], 84 | 85 | 'papertrail' => [ 86 | 'driver' => 'monolog', 87 | 'level' => env('LOG_LEVEL', 'debug'), 88 | 'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class), 89 | 'handler_with' => [ 90 | 'host' => env('PAPERTRAIL_URL'), 91 | 'port' => env('PAPERTRAIL_PORT'), 92 | 'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'), 93 | ], 94 | 'processors' => [PsrLogMessageProcessor::class], 95 | ], 96 | 97 | 'stderr' => [ 98 | 'driver' => 'monolog', 99 | 'level' => env('LOG_LEVEL', 'debug'), 100 | 'handler' => StreamHandler::class, 101 | 'formatter' => env('LOG_STDERR_FORMATTER'), 102 | 'with' => [ 103 | 'stream' => 'php://stderr', 104 | ], 105 | 'processors' => [PsrLogMessageProcessor::class], 106 | ], 107 | 108 | 'syslog' => [ 109 | 'driver' => 'syslog', 110 | 'level' => env('LOG_LEVEL', 'debug'), 111 | 'facility' => env('LOG_SYSLOG_FACILITY', LOG_USER), 112 | 'replace_placeholders' => true, 113 | ], 114 | 115 | 'errorlog' => [ 116 | 'driver' => 'errorlog', 117 | 'level' => env('LOG_LEVEL', 'debug'), 118 | 'replace_placeholders' => true, 119 | ], 120 | 121 | 'null' => [ 122 | 'driver' => 'monolog', 123 | 'handler' => NullHandler::class, 124 | ], 125 | 126 | 'emergency' => [ 127 | 'path' => storage_path('logs/laravel.log'), 128 | ], 129 | 130 | ], 131 | 132 | ]; 133 | -------------------------------------------------------------------------------- /public/js/toastr.min.js: -------------------------------------------------------------------------------- 1 | !function(e){e(["jquery"],function(e){return function(){function t(e,t,n){return g({type:O.error,iconClass:m().iconClasses.error,message:e,optionsOverride:n,title:t})}function n(t,n){return t||(t=m()),v=e("#"+t.containerId),v.length?v:(n&&(v=d(t)),v)}function o(e,t,n){return g({type:O.info,iconClass:m().iconClasses.info,message:e,optionsOverride:n,title:t})}function s(e){C=e}function i(e,t,n){return g({type:O.success,iconClass:m().iconClasses.success,message:e,optionsOverride:n,title:t})}function a(e,t,n){return g({type:O.warning,iconClass:m().iconClasses.warning,message:e,optionsOverride:n,title:t})}function r(e,t){var o=m();v||n(o),u(e,o,t)||l(o)}function c(t){var o=m();return v||n(o),t&&0===e(":focus",t).length?void h(t):void(v.children().length&&v.remove())}function l(t){for(var n=v.children(),o=n.length-1;o>=0;o--)u(e(n[o]),t)}function u(t,n,o){var s=!(!o||!o.force)&&o.force;return!(!t||!s&&0!==e(":focus",t).length)&&(t[n.hideMethod]({duration:n.hideDuration,easing:n.hideEasing,complete:function(){h(t)}}),!0)}function d(t){return v=e("
").attr("id",t.containerId).addClass(t.positionClass),v.appendTo(e(t.target)),v}function p(){return{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,closeMethod:!1,closeDuration:!1,closeEasing:!1,closeOnHover:!0,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",escapeHtml:!1,target:"body",closeHtml:'',closeClass:"toast-close-button",newestOnTop:!0,preventDuplicates:!1,progressBar:!1,progressClass:"toast-progress",rtl:!1}}function f(e){C&&C(e)}function g(t){function o(e){return null==e&&(e=""),e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function s(){c(),u(),d(),p(),g(),C(),l(),i()}function i(){var e="";switch(t.iconClass){case"toast-success":case"toast-info":e="polite";break;default:e="assertive"}I.attr("aria-live",e)}function a(){E.closeOnHover&&I.hover(H,D),!E.onclick&&E.tapToDismiss&&I.click(b),E.closeButton&&j&&j.click(function(e){e.stopPropagation?e.stopPropagation():void 0!==e.cancelBubble&&e.cancelBubble!==!0&&(e.cancelBubble=!0),E.onCloseClick&&E.onCloseClick(e),b(!0)}),E.onclick&&I.click(function(e){E.onclick(e),b()})}function r(){I.hide(),I[E.showMethod]({duration:E.showDuration,easing:E.showEasing,complete:E.onShown}),E.timeOut>0&&(k=setTimeout(b,E.timeOut),F.maxHideTime=parseFloat(E.timeOut),F.hideEta=(new Date).getTime()+F.maxHideTime,E.progressBar&&(F.intervalId=setInterval(x,10)))}function c(){t.iconClass&&I.addClass(E.toastClass).addClass(y)}function l(){E.newestOnTop?v.prepend(I):v.append(I)}function u(){if(t.title){var e=t.title;E.escapeHtml&&(e=o(t.title)),M.append(e).addClass(E.titleClass),I.append(M)}}function d(){if(t.message){var e=t.message;E.escapeHtml&&(e=o(t.message)),B.append(e).addClass(E.messageClass),I.append(B)}}function p(){E.closeButton&&(j.addClass(E.closeClass).attr("role","button"),I.prepend(j))}function g(){E.progressBar&&(q.addClass(E.progressClass),I.prepend(q))}function C(){E.rtl&&I.addClass("rtl")}function O(e,t){if(e.preventDuplicates){if(t.message===w)return!0;w=t.message}return!1}function b(t){var n=t&&E.closeMethod!==!1?E.closeMethod:E.hideMethod,o=t&&E.closeDuration!==!1?E.closeDuration:E.hideDuration,s=t&&E.closeEasing!==!1?E.closeEasing:E.hideEasing;if(!e(":focus",I).length||t)return clearTimeout(F.intervalId),I[n]({duration:o,easing:s,complete:function(){h(I),clearTimeout(k),E.onHidden&&"hidden"!==P.state&&E.onHidden(),P.state="hidden",P.endTime=new Date,f(P)}})}function D(){(E.timeOut>0||E.extendedTimeOut>0)&&(k=setTimeout(b,E.extendedTimeOut),F.maxHideTime=parseFloat(E.extendedTimeOut),F.hideEta=(new Date).getTime()+F.maxHideTime)}function H(){clearTimeout(k),F.hideEta=0,I.stop(!0,!0)[E.showMethod]({duration:E.showDuration,easing:E.showEasing})}function x(){var e=(F.hideEta-(new Date).getTime())/F.maxHideTime*100;q.width(e+"%")}var E=m(),y=t.iconClass||E.iconClass;if("undefined"!=typeof t.optionsOverride&&(E=e.extend(E,t.optionsOverride),y=t.optionsOverride.iconClass||y),!O(E,t)){T++,v=n(E,!0);var k=null,I=e("
"),M=e("
"),B=e("
"),q=e("
"),j=e(E.closeHtml),F={intervalId:null,hideEta:null,maxHideTime:null},P={toastId:T,state:"visible",startTime:new Date,options:E,map:t};return s(),r(),a(),f(P),E.debug&&console&&console.log(P),I}}function m(){return e.extend({},p(),b.options)}function h(e){v||(v=n()),e.is(":visible")||(e.remove(),e=null,0===v.children().length&&(v.remove(),w=void 0))}var v,C,w,T=0,O={error:"error",info:"info",success:"success",warning:"warning"},b={clear:r,remove:c,error:t,getContainer:n,info:o,options:{},subscribe:s,success:i,version:"2.1.4",warning:a};return b}()})}("function"==typeof define&&define.amd?define:function(e,t){"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):window.toastr=t(window.jQuery)}); 2 | //# sourceMappingURL=toastr.js.map 3 | -------------------------------------------------------------------------------- /public/css/toastr.min.css: -------------------------------------------------------------------------------- 1 | .toast-title{font-weight:700}.toast-message{-ms-word-wrap:break-word;word-wrap:break-word}.toast-message a,.toast-message label{color:#FFF}.toast-message a:hover{color:#CCC;text-decoration:none}.toast-close-button{position:relative;right:-.3em;top:-.3em;float:right;font-size:20px;font-weight:700;color:#FFF;-webkit-text-shadow:0 1px 0 #fff;text-shadow:0 1px 0 #fff;opacity:.8;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=80);filter:alpha(opacity=80);line-height:1}.toast-close-button:focus,.toast-close-button:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.4;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=40);filter:alpha(opacity=40)}.rtl .toast-close-button{left:-.3em;float:left;right:.3em}button.toast-close-button{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none}.toast-top-center{top:0;right:0;width:100%}.toast-bottom-center{bottom:0;right:0;width:100%}.toast-top-full-width{top:0;right:0;width:100%}.toast-bottom-full-width{bottom:0;right:0;width:100%}.toast-top-left{top:12px;left:12px}.toast-top-right{top:12px;right:12px}.toast-bottom-right{right:12px;bottom:12px}.toast-bottom-left{bottom:12px;left:12px}#toast-container{position:fixed;z-index:999999;pointer-events:none}#toast-container *{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#toast-container>div{position:relative;pointer-events:auto;overflow:hidden;margin:0 0 6px;padding:15px 15px 15px 50px;width:300px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background-position:15px center;background-repeat:no-repeat;-moz-box-shadow:0 0 12px #999;-webkit-box-shadow:0 0 12px #999;box-shadow:0 0 12px #999;color:#FFF;opacity:.8;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=80);filter:alpha(opacity=80)}#toast-container>div.rtl{direction:rtl;padding:15px 50px 15px 15px;background-position:right 15px center}#toast-container>div:hover{-moz-box-shadow:0 0 12px #000;-webkit-box-shadow:0 0 12px #000;box-shadow:0 0 12px #000;opacity:1;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);filter:alpha(opacity=100);cursor:pointer}#toast-container>.toast-info{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=)!important}#toast-container>.toast-error{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=)!important}#toast-container>.toast-success{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==)!important}#toast-container>.toast-warning{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=)!important}#toast-container.toast-bottom-center>div,#toast-container.toast-top-center>div{width:300px;margin-left:auto;margin-right:auto}#toast-container.toast-bottom-full-width>div,#toast-container.toast-top-full-width>div{width:96%;margin-left:auto;margin-right:auto}.toast{background-color:#030303}.toast-success{background-color:#51A351}.toast-error{background-color:#BD362F}.toast-info{background-color:#2F96B4}.toast-warning{background-color:#F89406}.toast-progress{position:absolute;left:0;bottom:0;height:4px;background-color:#000;opacity:.4;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=40);filter:alpha(opacity=40)}@media all and (max-width:240px){#toast-container>div{padding:8px 8px 8px 50px;width:11em}#toast-container>div.rtl{padding:8px 50px 8px 8px}#toast-container .toast-close-button{right:-.2em;top:-.2em}#toast-container .rtl .toast-close-button{left:-.2em;right:.2em}}@media all and (min-width:241px) and (max-width:480px){#toast-container>div{padding:8px 8px 8px 50px;width:18em}#toast-container>div.rtl{padding:8px 50px 8px 8px}#toast-container .toast-close-button{right:-.2em;top:-.2em}#toast-container .rtl .toast-close-button{left:-.2em;right:.2em}}@media all and (min-width:481px) and (max-width:768px){#toast-container>div{padding:15px 15px 15px 50px;width:25em}#toast-container>div.rtl{padding:15px 50px 15px 15px}} --------------------------------------------------------------------------------