Compare commits
5 Commits
0a3fdf347f
...
643ccd6d9e
| Author | SHA1 | Date | |
|---|---|---|---|
| 643ccd6d9e | |||
| 3e80ea4d5e | |||
| fe42967a74 | |||
| a1826ae53c | |||
| c7e01f404d |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -22,3 +22,4 @@ yarn-error.log
|
|||||||
/.vscode
|
/.vscode
|
||||||
/.zed
|
/.zed
|
||||||
**/.DS_Store
|
**/.DS_Store
|
||||||
|
IntelephenseHelper.php
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Filament\Pages;
|
namespace App\Filament\Pages;
|
||||||
|
|
||||||
|
use App\Models\UserRole;
|
||||||
use App\Settings\AboutSettings;
|
use App\Settings\AboutSettings;
|
||||||
use Filament\Forms\Components\FileUpload;
|
use Filament\Forms\Components\FileUpload;
|
||||||
use Filament\Forms\Components\Grid;
|
use Filament\Forms\Components\Grid;
|
||||||
@@ -223,7 +224,7 @@ class AboutPageSettings extends SettingsPage
|
|||||||
|
|
||||||
public static function getNavigationGroup(): ?string
|
public static function getNavigationGroup(): ?string
|
||||||
{
|
{
|
||||||
return __('CMS');
|
return __('About US');
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getNavigationLabel(): string
|
public static function getNavigationLabel(): string
|
||||||
@@ -245,4 +246,14 @@ class AboutPageSettings extends SettingsPage
|
|||||||
{
|
{
|
||||||
return 'Manage the content sections of the About Us page.';
|
return 'Manage the content sections of the About Us page.';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
public static function canAccess(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->canManageSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function canView(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->role === UserRole::ADMIN || auth()->user()->role === UserRole::MANAGER;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Filament\Pages;
|
namespace App\Filament\Pages;
|
||||||
|
|
||||||
|
use App\Models\UserRole;
|
||||||
use App\Settings\ContactSettings;
|
use App\Settings\ContactSettings;
|
||||||
use Filament\Forms\Components\Section;
|
use Filament\Forms\Components\Section;
|
||||||
use Filament\Forms\Components\Textarea;
|
use Filament\Forms\Components\Textarea;
|
||||||
@@ -12,7 +13,7 @@ use Illuminate\Contracts\Support\Htmlable;
|
|||||||
|
|
||||||
class ContactPageSettings extends SettingsPage
|
class ContactPageSettings extends SettingsPage
|
||||||
{
|
{
|
||||||
protected static ?string $navigationGroup = 'CMS';
|
protected static ?string $navigationGroup = 'Contact';
|
||||||
|
|
||||||
protected static ?string $navigationIcon = 'heroicon-o-phone';
|
protected static ?string $navigationIcon = 'heroicon-o-phone';
|
||||||
|
|
||||||
@@ -62,7 +63,7 @@ class ContactPageSettings extends SettingsPage
|
|||||||
|
|
||||||
public static function getNavigationGroup(): ?string
|
public static function getNavigationGroup(): ?string
|
||||||
{
|
{
|
||||||
return __('CMS');
|
return __('Contact');
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getNavigationLabel(): string
|
public static function getNavigationLabel(): string
|
||||||
@@ -84,4 +85,14 @@ class ContactPageSettings extends SettingsPage
|
|||||||
{
|
{
|
||||||
return 'Manage the contact form details, contact information, and map embed.';
|
return 'Manage the contact form details, contact information, and map embed.';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function canAccess(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->canManageSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function canView(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->role === UserRole::ADMIN || auth()->user()->role === UserRole::MANAGER;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Filament\Pages;
|
namespace App\Filament\Pages;
|
||||||
|
|
||||||
|
use App\Models\UserRole;
|
||||||
use App\Settings\HomeSettings;
|
use App\Settings\HomeSettings;
|
||||||
use Filament\Forms\Components\FileUpload;
|
use Filament\Forms\Components\FileUpload;
|
||||||
use Filament\Forms\Components\Grid;
|
use Filament\Forms\Components\Grid;
|
||||||
@@ -292,4 +293,14 @@ class HomePageSettings extends SettingsPage
|
|||||||
{
|
{
|
||||||
return 'Manage the homepage hero section, background video, and call-to-action content.';
|
return 'Manage the homepage hero section, background video, and call-to-action content.';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function canAccess(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->canManageSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function canView(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->role === UserRole::ADMIN || auth()->user()->role === UserRole::MANAGER;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Filament\Pages;
|
namespace App\Filament\Pages;
|
||||||
|
|
||||||
|
use App\Models\UserRole;
|
||||||
use App\Settings\CtaSettings;
|
use App\Settings\CtaSettings;
|
||||||
use Filament\Forms;
|
use Filament\Forms;
|
||||||
use Filament\Forms\Components\FileUpload;
|
use Filament\Forms\Components\FileUpload;
|
||||||
@@ -42,4 +43,14 @@ class ManageCtaSettings extends SettingsPage
|
|||||||
->columnSpan('full'),
|
->columnSpan('full'),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function canAccess(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->canManageSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function canView(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->role === UserRole::ADMIN || auth()->user()->role === UserRole::MANAGER;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Filament\Pages;
|
namespace App\Filament\Pages;
|
||||||
|
|
||||||
|
use App\Models\UserRole;
|
||||||
use App\Settings\PortfolioSettings;
|
use App\Settings\PortfolioSettings;
|
||||||
use Filament\Forms\Components\FileUpload;
|
use Filament\Forms\Components\FileUpload;
|
||||||
use Filament\Forms\Components\Grid;
|
use Filament\Forms\Components\Grid;
|
||||||
@@ -108,4 +109,14 @@ class ManagePortfolio extends SettingsPage
|
|||||||
{
|
{
|
||||||
return 'Manage the portfolio section content, including items, categories, and titles.';
|
return 'Manage the portfolio section content, including items, categories, and titles.';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function canAccess(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->canManageSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function canView(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->role === UserRole::ADMIN || auth()->user()->role === UserRole::MANAGER;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Filament\Pages;
|
namespace App\Filament\Pages;
|
||||||
|
|
||||||
|
use App\Models\UserRole;
|
||||||
use App\Settings\SiteSettings;
|
use App\Settings\SiteSettings;
|
||||||
use Filament\Forms;
|
use Filament\Forms;
|
||||||
use Filament\Forms\Form;
|
use Filament\Forms\Form;
|
||||||
@@ -168,4 +169,14 @@ class ManageSite extends SettingsPage
|
|||||||
{
|
{
|
||||||
return 'Manage your website\'s general configuration';
|
return 'Manage your website\'s general configuration';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function canAccess(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->canManageSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function canView(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->role === UserRole::ADMIN || auth()->user()->role === UserRole::MANAGER;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Filament\Pages;
|
namespace App\Filament\Pages;
|
||||||
|
|
||||||
|
use App\Models\UserRole;
|
||||||
use App\Settings\SiteSocialSettings;
|
use App\Settings\SiteSocialSettings;
|
||||||
use Filament\Forms;
|
use Filament\Forms;
|
||||||
use Filament\Forms\Form;
|
use Filament\Forms\Form;
|
||||||
@@ -77,4 +78,14 @@ class ManageSiteSocialSettings extends SettingsPage
|
|||||||
{
|
{
|
||||||
return 'Manage your social media profiles and sharing options';
|
return 'Manage your social media profiles and sharing options';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function canAccess(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->canManageSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function canView(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->role === UserRole::ADMIN || auth()->user()->role === UserRole::MANAGER;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Filament\Pages;
|
namespace App\Filament\Pages;
|
||||||
|
|
||||||
|
use App\Models\UserRole;
|
||||||
use App\Settings\SolutionSettings;
|
use App\Settings\SolutionSettings;
|
||||||
use Filament\Forms\Components\FileUpload;
|
use Filament\Forms\Components\FileUpload;
|
||||||
use Filament\Forms\Components\Grid;
|
use Filament\Forms\Components\Grid;
|
||||||
@@ -376,4 +377,14 @@ class ManageSolutions extends SettingsPage
|
|||||||
{
|
{
|
||||||
return 'Manage the solutions section content, including individual solution items.';
|
return 'Manage the solutions section content, including individual solution items.';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function canAccess(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->canManageSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function canView(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->role === UserRole::ADMIN || auth()->user()->role === UserRole::MANAGER;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Filament\Pages;
|
namespace App\Filament\Pages;
|
||||||
|
|
||||||
|
use App\Models\UserRole;
|
||||||
use App\Settings\SuccessSettings;
|
use App\Settings\SuccessSettings;
|
||||||
use Filament\Forms\Components\FileUpload;
|
use Filament\Forms\Components\FileUpload;
|
||||||
use Filament\Forms\Components\Grid;
|
use Filament\Forms\Components\Grid;
|
||||||
@@ -113,4 +114,14 @@ class ManageSuccess extends SettingsPage
|
|||||||
{
|
{
|
||||||
return 'Manage the success section content, including text, button, and skill bars.';
|
return 'Manage the success section content, including text, button, and skill bars.';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function canAccess(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->canManageSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function canView(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->role === UserRole::ADMIN || auth()->user()->role === UserRole::MANAGER;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ namespace App\Filament\Resources;
|
|||||||
use App\Filament\Resources\ApplicationResource\Pages;
|
use App\Filament\Resources\ApplicationResource\Pages;
|
||||||
use App\Models\Application;
|
use App\Models\Application;
|
||||||
use App\Models\Career;
|
use App\Models\Career;
|
||||||
|
use App\Models\UserRole;
|
||||||
use Filament\Forms;
|
use Filament\Forms;
|
||||||
use Filament\Forms\Form;
|
use Filament\Forms\Form;
|
||||||
use Filament\Resources\Resource;
|
use Filament\Resources\Resource;
|
||||||
@@ -104,4 +105,9 @@ class ApplicationResource extends Resource
|
|||||||
'edit' => Pages\EditApplication::route('/{record}/edit'),
|
'edit' => Pages\EditApplication::route('/{record}/edit'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function canViewAny(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->role === UserRole::ADMIN || auth()->user()->role === UserRole::MANAGER;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ use Filament\Resources\Resource;
|
|||||||
use Filament\Tables;
|
use Filament\Tables;
|
||||||
use Filament\Tables\Columns\ImageColumn;
|
use Filament\Tables\Columns\ImageColumn;
|
||||||
use Filament\Tables\Table;
|
use Filament\Tables\Table;
|
||||||
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
|
|
||||||
class AuthorResource extends Resource
|
class AuthorResource extends Resource
|
||||||
{
|
{
|
||||||
@@ -20,7 +21,7 @@ class AuthorResource extends Resource
|
|||||||
|
|
||||||
protected static ?string $navigationIcon = 'heroicon-o-users';
|
protected static ?string $navigationIcon = 'heroicon-o-users';
|
||||||
|
|
||||||
protected static ?string $navigationGroup = 'News';
|
protected static ?string $navigationGroup = 'News & Stories';
|
||||||
|
|
||||||
public static function form(Form $form): Form
|
public static function form(Form $form): Form
|
||||||
{
|
{
|
||||||
@@ -91,4 +92,34 @@ class AuthorResource extends Resource
|
|||||||
'edit' => Pages\EditAuthor::route('/{record}/edit'),
|
'edit' => Pages\EditAuthor::route('/{record}/edit'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function canViewAny(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->can('view-authors');
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function canCreate(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->can('view-authors');
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function canEdit(mixed $record): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->can('view-authors');
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function canDelete(mixed $record): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->can('view-authors');
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function canDeleteAny(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->can('view-authors');
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getEloquentQuery(): Builder
|
||||||
|
{
|
||||||
|
return parent::getEloquentQuery()->withoutGlobalScopes();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ namespace App\Filament\Resources;
|
|||||||
|
|
||||||
use App\Filament\Resources\BrandResource\Pages;
|
use App\Filament\Resources\BrandResource\Pages;
|
||||||
use App\Models\Brand;
|
use App\Models\Brand;
|
||||||
|
use App\Models\UserRole;
|
||||||
use Filament\Forms\Components\FileUpload;
|
use Filament\Forms\Components\FileUpload;
|
||||||
use Filament\Forms\Components\TextInput;
|
use Filament\Forms\Components\TextInput;
|
||||||
use Filament\Forms\Components\Toggle;
|
use Filament\Forms\Components\Toggle;
|
||||||
@@ -21,7 +22,7 @@ class BrandResource extends Resource
|
|||||||
|
|
||||||
protected static ?string $navigationIcon = 'heroicon-o-tag';
|
protected static ?string $navigationIcon = 'heroicon-o-tag';
|
||||||
|
|
||||||
protected static ?string $navigationGroup = 'Brands';
|
protected static ?string $navigationGroup = 'Home';
|
||||||
|
|
||||||
public static function form(Form $form): Form
|
public static function form(Form $form): Form
|
||||||
{
|
{
|
||||||
@@ -79,4 +80,9 @@ class BrandResource extends Resource
|
|||||||
'index' => Pages\ManageBrands::route('/'),
|
'index' => Pages\ManageBrands::route('/'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function canViewAny(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->role === UserRole::ADMIN || auth()->user()->role === UserRole::MANAGER;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ namespace App\Filament\Resources;
|
|||||||
use App\Filament\Resources\CareerResource\Pages;
|
use App\Filament\Resources\CareerResource\Pages;
|
||||||
use App\Filament\Resources\CareerResource\RelationManagers;
|
use App\Filament\Resources\CareerResource\RelationManagers;
|
||||||
use App\Models\Career;
|
use App\Models\Career;
|
||||||
|
use App\Models\UserRole;
|
||||||
use Filament\Forms;
|
use Filament\Forms;
|
||||||
use Filament\Forms\Components\Repeater;
|
use Filament\Forms\Components\Repeater;
|
||||||
use Filament\Forms\Components\Textarea;
|
use Filament\Forms\Components\Textarea;
|
||||||
@@ -117,4 +118,9 @@ class CareerResource extends Resource
|
|||||||
'edit' => Pages\EditCareer::route('/{record}/edit'),
|
'edit' => Pages\EditCareer::route('/{record}/edit'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function canViewAny(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->role === UserRole::ADMIN || auth()->user()->role === UserRole::MANAGER;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ namespace App\Filament\Resources;
|
|||||||
|
|
||||||
use App\Filament\Resources\CommentResource\Pages;
|
use App\Filament\Resources\CommentResource\Pages;
|
||||||
use App\Models\Comment;
|
use App\Models\Comment;
|
||||||
|
use App\Models\UserRole;
|
||||||
use Filament\Forms;
|
use Filament\Forms;
|
||||||
use Filament\Forms\Components\RichEditor;
|
use Filament\Forms\Components\RichEditor;
|
||||||
use Filament\Forms\Components\Select;
|
use Filament\Forms\Components\Select;
|
||||||
@@ -19,7 +20,7 @@ class CommentResource extends Resource
|
|||||||
|
|
||||||
protected static ?string $navigationIcon = 'heroicon-o-chat-bubble-bottom-center-text';
|
protected static ?string $navigationIcon = 'heroicon-o-chat-bubble-bottom-center-text';
|
||||||
|
|
||||||
protected static ?string $navigationGroup = 'News';
|
protected static ?string $navigationGroup = 'News & Stories';
|
||||||
|
|
||||||
public static function form(Form $form): Form
|
public static function form(Form $form): Form
|
||||||
{
|
{
|
||||||
@@ -93,4 +94,9 @@ class CommentResource extends Resource
|
|||||||
'edit' => Pages\EditComment::route('/{record}/edit'),
|
'edit' => Pages\EditComment::route('/{record}/edit'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function canViewAny(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->role === UserRole::ADMIN || auth()->user()->role === UserRole::MANAGER;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ namespace App\Filament\Resources;
|
|||||||
use App\Filament\Resources\InternshipResource\Pages;
|
use App\Filament\Resources\InternshipResource\Pages;
|
||||||
use App\Filament\Resources\InternshipResource\RelationManagers;
|
use App\Filament\Resources\InternshipResource\RelationManagers;
|
||||||
use App\Models\Internship;
|
use App\Models\Internship;
|
||||||
|
use App\Models\UserRole;
|
||||||
use Filament\Forms;
|
use Filament\Forms;
|
||||||
use Filament\Forms\Components\Repeater;
|
use Filament\Forms\Components\Repeater;
|
||||||
use Filament\Forms\Components\Textarea;
|
use Filament\Forms\Components\Textarea;
|
||||||
@@ -18,7 +19,7 @@ class InternshipResource extends Resource
|
|||||||
{
|
{
|
||||||
protected static ?string $model = Internship::class;
|
protected static ?string $model = Internship::class;
|
||||||
|
|
||||||
protected static ?string $navigationGroup = 'Internships';
|
protected static ?string $navigationGroup = 'Careers';
|
||||||
|
|
||||||
protected static ?string $navigationIcon = 'heroicon-o-academic-cap';
|
protected static ?string $navigationIcon = 'heroicon-o-academic-cap';
|
||||||
|
|
||||||
@@ -120,4 +121,9 @@ class InternshipResource extends Resource
|
|||||||
'edit' => Pages\EditInternship::route('/{record}/edit'),
|
'edit' => Pages\EditInternship::route('/{record}/edit'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function canViewAny(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->role === UserRole::ADMIN || auth()->user()->role === UserRole::MANAGER;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ use Filament\Resources\Resource;
|
|||||||
use Filament\Tables;
|
use Filament\Tables;
|
||||||
use Filament\Tables\Columns\ImageColumn;
|
use Filament\Tables\Columns\ImageColumn;
|
||||||
use Filament\Tables\Table;
|
use Filament\Tables\Table;
|
||||||
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
class NewsResource extends Resource
|
class NewsResource extends Resource
|
||||||
@@ -24,7 +25,7 @@ class NewsResource extends Resource
|
|||||||
|
|
||||||
protected static ?string $navigationIcon = 'heroicon-o-newspaper';
|
protected static ?string $navigationIcon = 'heroicon-o-newspaper';
|
||||||
|
|
||||||
protected static ?string $navigationGroup = 'News';
|
protected static ?string $navigationGroup = 'News & Stories';
|
||||||
|
|
||||||
public static function form(Form $form): Form
|
public static function form(Form $form): Form
|
||||||
{
|
{
|
||||||
@@ -123,4 +124,34 @@ class NewsResource extends Resource
|
|||||||
'edit' => Pages\EditNews::route('/{record}/edit'),
|
'edit' => Pages\EditNews::route('/{record}/edit'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function canViewAny(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->can('manage-news-and-success');
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function canCreate(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->can('manage-news-and-success');
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function canEdit(mixed $record): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->can('manage-news-and-success');
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function canDelete(mixed $record): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->can('manage-news-and-success');
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function canDeleteAny(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->can('manage-news-and-success');
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getEloquentQuery(): Builder
|
||||||
|
{
|
||||||
|
return parent::getEloquentQuery()->withoutGlobalScopes();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ namespace App\Filament\Resources;
|
|||||||
|
|
||||||
use App\Filament\Resources\SolutionResource\Pages;
|
use App\Filament\Resources\SolutionResource\Pages;
|
||||||
use App\Models\Solution;
|
use App\Models\Solution;
|
||||||
|
use App\Models\UserRole;
|
||||||
use Filament\Forms;
|
use Filament\Forms;
|
||||||
use Filament\Forms\Form;
|
use Filament\Forms\Form;
|
||||||
use Filament\Resources\Resource;
|
use Filament\Resources\Resource;
|
||||||
@@ -17,7 +18,7 @@ class SolutionResource extends Resource
|
|||||||
|
|
||||||
protected static ?string $navigationIcon = 'heroicon-o-light-bulb';
|
protected static ?string $navigationIcon = 'heroicon-o-light-bulb';
|
||||||
|
|
||||||
protected static ?string $navigationGroup = 'Solutions';
|
protected static ?string $navigationGroup = 'Our Solutions';
|
||||||
|
|
||||||
public static function form(Form $form): Form
|
public static function form(Form $form): Form
|
||||||
{
|
{
|
||||||
@@ -129,4 +130,9 @@ class SolutionResource extends Resource
|
|||||||
'edit' => Pages\EditSolution::route('/{record}/edit'),
|
'edit' => Pages\EditSolution::route('/{record}/edit'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function canViewAny(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->role === UserRole::ADMIN || auth()->user()->role === UserRole::MANAGER;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ use Filament\Resources\Resource;
|
|||||||
use Filament\Tables;
|
use Filament\Tables;
|
||||||
use Filament\Tables\Columns\ImageColumn;
|
use Filament\Tables\Columns\ImageColumn;
|
||||||
use Filament\Tables\Table;
|
use Filament\Tables\Table;
|
||||||
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
class SuccessResource extends Resource
|
class SuccessResource extends Resource
|
||||||
@@ -22,7 +23,7 @@ class SuccessResource extends Resource
|
|||||||
|
|
||||||
protected static ?string $navigationIcon = 'heroicon-o-bookmark-square';
|
protected static ?string $navigationIcon = 'heroicon-o-bookmark-square';
|
||||||
|
|
||||||
protected static ?string $navigationGroup = 'Success Stories';
|
protected static ?string $navigationGroup = 'News & Stories';
|
||||||
|
|
||||||
public static function form(Form $form): Form
|
public static function form(Form $form): Form
|
||||||
{
|
{
|
||||||
@@ -112,4 +113,34 @@ class SuccessResource extends Resource
|
|||||||
'edit' => Pages\EditSuccess::route('/{record}/edit'),
|
'edit' => Pages\EditSuccess::route('/{record}/edit'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function canViewAny(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->can('manage-news-and-success');
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function canCreate(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->can('manage-news-and-success');
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function canEdit(mixed $record): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->can('manage-news-and-success');
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function canDelete(mixed $record): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->can('manage-news-and-success');
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function canDeleteAny(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->can('manage-news-and-success');
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getEloquentQuery(): Builder
|
||||||
|
{
|
||||||
|
return parent::getEloquentQuery()->withoutGlobalScopes();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,22 +3,17 @@
|
|||||||
namespace App\Filament\Resources;
|
namespace App\Filament\Resources;
|
||||||
|
|
||||||
use App\Filament\Resources\TeamMemberResource\Pages;
|
use App\Filament\Resources\TeamMemberResource\Pages;
|
||||||
use App\Filament\Resources\TeamMemberResource\RelationManagers;
|
|
||||||
use App\Models\TeamMember;
|
use App\Models\TeamMember;
|
||||||
|
use App\Models\UserRole;
|
||||||
use Filament\Forms\Components\FileUpload;
|
use Filament\Forms\Components\FileUpload;
|
||||||
use Filament\Forms\Components\Textarea;
|
use Filament\Forms\Components\Textarea;
|
||||||
use Filament\Forms\Components\TextInput;
|
use Filament\Forms\Components\TextInput;
|
||||||
use Filament\Forms\Form;
|
use Filament\Forms\Form;
|
||||||
use Filament\Resources\Resource;
|
use Filament\Resources\Resource;
|
||||||
use Filament\Tables;
|
use Filament\Tables;
|
||||||
use Filament\Tables\Actions\ActionGroup;
|
|
||||||
use Filament\Tables\Actions\DeleteAction;
|
|
||||||
use Filament\Tables\Actions\EditAction;
|
|
||||||
use Filament\Tables\Columns\ImageColumn;
|
use Filament\Tables\Columns\ImageColumn;
|
||||||
use Filament\Tables\Columns\TextColumn;
|
use Filament\Tables\Columns\TextColumn;
|
||||||
use Filament\Tables\Table;
|
use Filament\Tables\Table;
|
||||||
use Illuminate\Database\Eloquent\Builder;
|
|
||||||
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
|
||||||
|
|
||||||
class TeamMemberResource extends Resource
|
class TeamMemberResource extends Resource
|
||||||
{
|
{
|
||||||
@@ -26,7 +21,7 @@ class TeamMemberResource extends Resource
|
|||||||
|
|
||||||
protected static ?string $navigationIcon = 'heroicon-o-users';
|
protected static ?string $navigationIcon = 'heroicon-o-users';
|
||||||
|
|
||||||
protected static ?string $navigationGroup = 'CMS';
|
protected static ?string $navigationGroup = 'About US';
|
||||||
|
|
||||||
public static function form(Form $form): Form
|
public static function form(Form $form): Form
|
||||||
{
|
{
|
||||||
@@ -91,4 +86,9 @@ class TeamMemberResource extends Resource
|
|||||||
'edit' => Pages\EditTeamMember::route('/{record}/edit'),
|
'edit' => Pages\EditTeamMember::route('/{record}/edit'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function canViewAny(): bool
|
||||||
|
{
|
||||||
|
return auth()->user()->role === UserRole::ADMIN || auth()->user()->role === UserRole::MANAGER;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
namespace App\Filament\Resources\TeamMemberResource\Pages;
|
namespace App\Filament\Resources\TeamMemberResource\Pages;
|
||||||
|
|
||||||
use App\Filament\Resources\TeamMemberResource;
|
use App\Filament\Resources\TeamMemberResource;
|
||||||
use Filament\Actions;
|
|
||||||
use Filament\Resources\Pages\CreateRecord;
|
use Filament\Resources\Pages\CreateRecord;
|
||||||
|
|
||||||
class CreateTeamMember extends CreateRecord
|
class CreateTeamMember extends CreateRecord
|
||||||
|
|||||||
@@ -2,6 +2,13 @@
|
|||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
|
enum UserRole: string
|
||||||
|
{
|
||||||
|
case ADMIN = 'admin';
|
||||||
|
case MANAGER = 'manager';
|
||||||
|
case NEWS_WRITER = 'news_writer';
|
||||||
|
}
|
||||||
|
|
||||||
// use Illuminate\Contracts\Auth\MustVerifyEmail;
|
// use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||||
@@ -21,6 +28,7 @@ class User extends Authenticatable
|
|||||||
'name',
|
'name',
|
||||||
'email',
|
'email',
|
||||||
'password',
|
'password',
|
||||||
|
'role',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -43,6 +51,12 @@ class User extends Authenticatable
|
|||||||
return [
|
return [
|
||||||
'email_verified_at' => 'datetime',
|
'email_verified_at' => 'datetime',
|
||||||
'password' => 'hashed',
|
'password' => 'hashed',
|
||||||
|
'role' => UserRole::class,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canManageSettings(): bool
|
||||||
|
{
|
||||||
|
return $this->role === UserRole::ADMIN || $this->role === UserRole::MANAGER;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ namespace App\Providers\Filament;
|
|||||||
use App\Filament\Pages\HomePageSettings;
|
use App\Filament\Pages\HomePageSettings;
|
||||||
use App\Filament\Pages\ManageCtaSettings;
|
use App\Filament\Pages\ManageCtaSettings;
|
||||||
use App\Filament\Resources\ApplicationResource;
|
use App\Filament\Resources\ApplicationResource;
|
||||||
|
use App\Models\User;
|
||||||
|
use App\Models\UserRole;
|
||||||
use Filament\Http\Middleware\Authenticate;
|
use Filament\Http\Middleware\Authenticate;
|
||||||
use Filament\Http\Middleware\DisableBladeIconComponents;
|
use Filament\Http\Middleware\DisableBladeIconComponents;
|
||||||
use Filament\Http\Middleware\DispatchServingFilamentEvent;
|
use Filament\Http\Middleware\DispatchServingFilamentEvent;
|
||||||
@@ -19,6 +21,7 @@ use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken;
|
|||||||
use Illuminate\Routing\Middleware\SubstituteBindings;
|
use Illuminate\Routing\Middleware\SubstituteBindings;
|
||||||
use Illuminate\Session\Middleware\AuthenticateSession;
|
use Illuminate\Session\Middleware\AuthenticateSession;
|
||||||
use Illuminate\Session\Middleware\StartSession;
|
use Illuminate\Session\Middleware\StartSession;
|
||||||
|
use Illuminate\Support\Facades\Gate;
|
||||||
use Illuminate\View\Middleware\ShareErrorsFromSession;
|
use Illuminate\View\Middleware\ShareErrorsFromSession;
|
||||||
|
|
||||||
class PanelPanelProvider extends PanelProvider
|
class PanelPanelProvider extends PanelProvider
|
||||||
@@ -30,9 +33,20 @@ class PanelPanelProvider extends PanelProvider
|
|||||||
->id('panel')
|
->id('panel')
|
||||||
->path('panel')
|
->path('panel')
|
||||||
->login()
|
->login()
|
||||||
|
->profile()
|
||||||
->colors([
|
->colors([
|
||||||
'primary' => Color::Amber,
|
'primary' => Color::Amber,
|
||||||
])
|
])
|
||||||
|
->navigationGroups([
|
||||||
|
'Home',
|
||||||
|
'About US',
|
||||||
|
'Our Solutions',
|
||||||
|
'News & Stories',
|
||||||
|
'Careers',
|
||||||
|
'Contact',
|
||||||
|
'Settings',
|
||||||
|
'Activities',
|
||||||
|
])
|
||||||
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
|
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
|
||||||
->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
|
->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
|
||||||
->pages([
|
->pages([
|
||||||
@@ -43,7 +57,6 @@ class PanelPanelProvider extends PanelProvider
|
|||||||
->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
|
->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
|
||||||
->widgets([
|
->widgets([
|
||||||
Widgets\AccountWidget::class,
|
Widgets\AccountWidget::class,
|
||||||
Widgets\FilamentInfoWidget::class,
|
|
||||||
])
|
])
|
||||||
->middleware([
|
->middleware([
|
||||||
EncryptCookies::class,
|
EncryptCookies::class,
|
||||||
@@ -64,4 +77,27 @@ class PanelPanelProvider extends PanelProvider
|
|||||||
ApplicationResource::class,
|
ApplicationResource::class,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function boot(): void
|
||||||
|
{
|
||||||
|
Gate::before(function (User $user, string $ability) {
|
||||||
|
if ($user->role === UserRole::ADMIN) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
});
|
||||||
|
|
||||||
|
Gate::define('view-activity-logs', function (User $user) {
|
||||||
|
return $user->role === UserRole::ADMIN;
|
||||||
|
});
|
||||||
|
|
||||||
|
Gate::define('manage-news-and-success', function (User $user) {
|
||||||
|
return $user->role === UserRole::NEWS_WRITER || $user->role === UserRole::ADMIN || $user->role === UserRole::MANAGER;
|
||||||
|
});
|
||||||
|
|
||||||
|
Gate::define('view-authors', function (User $user) {
|
||||||
|
return $user->role === UserRole::NEWS_WRITER || $user->role === UserRole::ADMIN || $user->role === UserRole::MANAGER;
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,35 +8,50 @@ class AboutSettings extends Settings
|
|||||||
{
|
{
|
||||||
// Our Story Section
|
// Our Story Section
|
||||||
public string $our_story_title;
|
public string $our_story_title;
|
||||||
|
|
||||||
public string $our_story_subtitle;
|
public string $our_story_subtitle;
|
||||||
|
|
||||||
public string $our_story_paragraph_one;
|
public string $our_story_paragraph_one;
|
||||||
|
|
||||||
public string $our_story_paragraph_two;
|
public string $our_story_paragraph_two;
|
||||||
|
|
||||||
public string $our_story_paragraph_three;
|
public string $our_story_paragraph_three;
|
||||||
|
|
||||||
public string $our_story_button_text;
|
public string $our_story_button_text;
|
||||||
|
|
||||||
public string $our_story_button_url;
|
public string $our_story_button_url;
|
||||||
|
|
||||||
public string $our_story_video_poster;
|
public string $our_story_video_poster;
|
||||||
|
|
||||||
public string $our_story_video_source;
|
public string $our_story_video_source;
|
||||||
|
|
||||||
// Our Journey Section
|
// Our Journey Section
|
||||||
public string $our_journey_title;
|
public string $our_journey_title;
|
||||||
|
|
||||||
public string $our_journey_subtitle;
|
public string $our_journey_subtitle;
|
||||||
|
|
||||||
public array $our_journey_milestones; // [{year: 2010, title: "Start Company", description: "...", image: "..."}]
|
public array $our_journey_milestones; // [{year: 2010, title: "Start Company", description: "...", image: "..."}]
|
||||||
|
|
||||||
// Company Structure Section
|
// Company Structure Section
|
||||||
public string $company_structure_title;
|
public string $company_structure_title;
|
||||||
|
|
||||||
public string $company_structure_subtitle;
|
public string $company_structure_subtitle;
|
||||||
|
|
||||||
public string $company_structure_director_name;
|
public string $company_structure_director_name;
|
||||||
|
|
||||||
public string $company_structure_advisor_name;
|
public string $company_structure_advisor_name;
|
||||||
|
|
||||||
public array $company_structure_departments; // [{name: "HSE", person: "Michael Brown"}]
|
public array $company_structure_departments; // [{name: "HSE", person: "Michael Brown"}]
|
||||||
|
|
||||||
// Our Facilities Section
|
// Our Facilities Section
|
||||||
public string $our_facilities_title;
|
public string $our_facilities_title;
|
||||||
public string $our_facilities_subtitle;
|
|
||||||
public array $our_facilities_locations; // [{name: "Headquarters", location: "...", description: "...", image: "...", tags: ["R&D Labs"]}]
|
|
||||||
|
|
||||||
|
public string $our_facilities_subtitle;
|
||||||
|
|
||||||
|
public array $our_facilities_locations; // [{name: "Headquarters", location: "...", description: "...", image: "...", tags: ["R&D Labs"]}]
|
||||||
|
|
||||||
public static function group(): string
|
public static function group(): string
|
||||||
{
|
{
|
||||||
return 'cms_aboutpage';
|
return 'cms_aboutpage';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
101
config/filament.php
Normal file
101
config/filament.php
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Broadcasting
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| By uncommenting the Laravel Echo configuration, you may connect Filament
|
||||||
|
| to any Pusher-compatible websockets server.
|
||||||
|
|
|
||||||
|
| This will allow your users to receive real-time notifications.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'broadcasting' => [
|
||||||
|
|
||||||
|
// 'echo' => [
|
||||||
|
// 'broadcaster' => 'pusher',
|
||||||
|
// 'key' => env('VITE_PUSHER_APP_KEY'),
|
||||||
|
// 'cluster' => env('VITE_PUSHER_APP_CLUSTER'),
|
||||||
|
// 'wsHost' => env('VITE_PUSHER_HOST'),
|
||||||
|
// 'wsPort' => env('VITE_PUSHER_PORT'),
|
||||||
|
// 'wssPort' => env('VITE_PUSHER_PORT'),
|
||||||
|
// 'authEndpoint' => '/broadcasting/auth',
|
||||||
|
// 'disableStats' => true,
|
||||||
|
// 'encrypted' => true,
|
||||||
|
// 'forceTLS' => true,
|
||||||
|
// ],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Filesystem Disk
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This is the storage disk Filament will use to store files. You may use
|
||||||
|
| any of the disks defined in the `config/filesystems.php`.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default_filesystem_disk' => env('FILAMENT_FILESYSTEM_DISK', 'public'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Assets Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This is the directory where Filament's assets will be published to. It
|
||||||
|
| is relative to the `public` directory of your Laravel application.
|
||||||
|
|
|
||||||
|
| After changing the path, you should run `php artisan filament:assets`.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'assets_path' => null,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Cache Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This is the directory that Filament will use to store cache files that
|
||||||
|
| are used to optimize the registration of components.
|
||||||
|
|
|
||||||
|
| After changing the path, you should run `php artisan filament:cache-components`.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'cache_path' => base_path('bootstrap/cache/filament'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Livewire Loading Delay
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This sets the delay before loading indicators appear.
|
||||||
|
|
|
||||||
|
| Setting this to 'none' makes indicators appear immediately, which can be
|
||||||
|
| desirable for high-latency connections. Setting it to 'default' applies
|
||||||
|
| Livewire's standard 200ms delay.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'livewire_loading_delay' => 'default',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| System Route Prefix
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This is the prefix used for the system routes that Filament registers,
|
||||||
|
| such as the routes for downloading exports and failed import rows.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'system_route_prefix' => 'filament',
|
||||||
|
|
||||||
|
];
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('users', function (Blueprint $table) {
|
||||||
|
$table->string('role')->default('news_writer')->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('users', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('role');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -30,6 +30,9 @@
|
|||||||
<div class="price__area section-padding">
|
<div class="price__area section-padding">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
<div class="col-xl-12 mb-25 text-center">
|
||||||
|
<h3 class="section-title">For general application, send your resume at career@gujurly.com</h3>
|
||||||
|
</div>
|
||||||
@forelse ($careers as $career)
|
@forelse ($careers as $career)
|
||||||
<div class="col-xl-4 col-md-6 xl-mb-25 wow fadeInUp" data-wow-delay=".4s">
|
<div class="col-xl-4 col-md-6 xl-mb-25 wow fadeInUp" data-wow-delay=".4s">
|
||||||
<div class="price__area-item">
|
<div class="price__area-item">
|
||||||
|
|||||||
@@ -30,6 +30,9 @@
|
|||||||
<div class="price__area section-padding">
|
<div class="price__area section-padding">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
<div class="col-xl-12 mb-25 text-center">
|
||||||
|
<h3 class="section-title">For general application, send your resume at career@gujurly.com</h3>
|
||||||
|
</div>
|
||||||
@forelse ($internships as $internship)
|
@forelse ($internships as $internship)
|
||||||
<div class="col-xl-4 col-md-6 xl-mb-25 wow fadeInUp" data-wow-delay=".4s">
|
<div class="col-xl-4 col-md-6 xl-mb-25 wow fadeInUp" data-wow-delay=".4s">
|
||||||
<div class="price__area-item">
|
<div class="price__area-item">
|
||||||
|
|||||||
Reference in New Issue
Block a user