No video

Admin Panel | Build Blog with Laravel, Livewire & Filament #8

  Рет қаралды 7,805

Yelo Code

Yelo Code

Күн бұрын

Welcome to our laravel blog project series, in this comprehensive series we will build a blog from scratch using livewire 3 and filament 3.
Today we are going to build our admin panel, using filament 3 admin builder suit of tools. I will also cover how to auto generate slugs and also handle relationships inside our forms
We will cover how to install and customize jetstream, create layouts, setup database migrations and models, display posts, use livewire 3 to create dynamic components without page reloads and more.
Next Episodes (Playlist):
• Build Blog with Larave...
Html Template :
github.com/yel...
Project Code :
github.com/yel...
Filament Documentation :
filamentphp.co...
Free Livewire 3 Course Playlist :
• Laravel Livewire 3 Cou...
Livewire 3 website :
livewire.larav...
If you would like me to make more livewire videos, please let me know by liking the video and commenting what you like to learn next.
What is livewire:
Livewire is a full-stack framework for Laravel that makes building dynamic interfaces simple, without leaving the comfort of Laravel. (Taken from Livewire Documentation)

Пікірлер: 50
@francosimonini7103
@francosimonini7103 11 ай бұрын
I am trying to install Filament but I always get this error "Your requirements could not be resolve to an installable set of packages". How can I solve this issue? Thanks
@francosimonini7103
@francosimonini7103 11 ай бұрын
Solved,... in my case: PHP version 8.1,2, I had firstly to uncomment extension=intl in the php.ini file then install php8.1.intl
@yelocode
@yelocode 11 ай бұрын
Thanks for sharing the solution
@umairmalik6685
@umairmalik6685 8 ай бұрын
THANKS MAN YOUR VIDEO MAKE MY DAY!
@yelocode
@yelocode 8 ай бұрын
Glad I could help
@scientist.entity6609
@scientist.entity6609 8 ай бұрын
An other great video, thank you !
@kuroneko3685
@kuroneko3685 7 ай бұрын
Hello, this is indeed a great video! but i have some error, i get this "SQLSTATE[42S22]: Column not found: 1054 Unknown column 'category_post.category_id' in 'on clause' select distinct `categories`.* from `categories` left join `category_post` on `categories`.`id` = `category_post`.`category_id` where (`title` like %php%) order by `categories`.`title` asc limit 50"
@daneymsjosh
@daneymsjosh Ай бұрын
I had a problem with filament installation saying that, "Your requirements could not be resolve to an installable set of packages". Is this a good solution? I found that when I run this command, instead of the one in the documentation, it would install it: composer require filament/filament:"^3.2.52" -W
@kreaweb-be
@kreaweb-be 11 ай бұрын
We now have 2 login routes: /login and /admin/login The first uses Jetstream, the latter Filament. This rases 2 questions: 1. How will you eliminate one of them and make the other work for both? 2. How can you redirect users to the Admin panel after login on JetStream? Thanks.
@dimyatiutoyo8655
@dimyatiutoyo8655 11 ай бұрын
redirect /login to /admin/login maybe?
@yelocode
@yelocode 11 ай бұрын
Well since, we also have regular users who should not have access to the admin panel, I don't think in most cases you would want to remove the filament login route. But if you really want only one login route, you can 1. with jetstream, since it uses fortify you can remove the login / all auth pages that have a view by setting 'views' => false, inside the foritfy.php config file. Although the logout route will still work as far as I know it just removes the pages that return a blade file. 2. For this one, you will need to create a custom login response and then redirect the user to admin page if they are and admin, a simple solution like below would work: inside app/Providers/FortifyServiceProvider.php: use Laravel\Fortify\Contracts\LoginResponse; $this->app->instance(LoginResponse::class, new class implements LoginResponse { public function toResponse($request) { if ($request->user()->is_admin) { return redirect()->intended('/admin/dashboard'); } return redirect()->intended('/'); } });
@WEESPlayzZz
@WEESPlayzZz 11 ай бұрын
Wow, i think filament is awesome but at same time it's simple but complicated 😂
@yelocode
@yelocode 11 ай бұрын
Haha, yea for simple crud its super easy, but more complex stuff it can get complicated
@ahmoodrizale
@ahmoodrizale 9 ай бұрын
Hi Nice Tutorials, but i have a question how to show suggestion when type like afterStateUpdated and just tab to complete it , because my laravel/vscode didn't show it and i must manually import use Filament\Forms\Components\TextInput in my code otherwise it will error.
@yelocode
@yelocode 9 ай бұрын
Thanks for watching. You need to install a php plugin for vs code to get the auto suggestion, I cover the 2 most popular options in this video: Top VS Code Plugins for Laravel Development Top VS Code Plugins for Laravel Development kzbin.info/www/bejne/fJbGqaClaK53ibM
@ivanbarta2821
@ivanbarta2821 10 ай бұрын
Amazing 👍
@yelocode
@yelocode 10 ай бұрын
Thank you
@ousssika5359
@ousssika5359 11 ай бұрын
the Select sould be Select:make('user_id')->label('author') not Select:make('author') ,
@yelocode
@yelocode 11 ай бұрын
I tested it out, it seems to work on updates so I didn't notice the issue, but not when creating, I'll fix that in the next episode. Thanks for letting me know.
@ivanbarta2821
@ivanbarta2821 10 ай бұрын
You are right, thaks 👍
@RafaelSorto
@RafaelSorto 11 ай бұрын
@yelocode is there a way to stop the slug from automatically updating if it has been manually set by the admin to avoid overwritting it ?
@yelocode
@yelocode 11 ай бұрын
Yes, you can do that, there is a trick on the filament website about this : v2.filamentphp.com/tricks/generate-slugs-without-overriding There is also a plugin for slugs with more features, but I personally haven't used it : github.com/camya/filament-title-with-slug May be helpful for your usecase.
@frederickosei4553
@frederickosei4553 5 ай бұрын
Nice tutorial but what is the best way to deploy this on a cpanel
@user-fm6vc6bq2r
@user-fm6vc6bq2r 9 ай бұрын
I cant login to filament /admin, but when i try login using jetstream i can access /admin filament. Im using laravel 10 with filament 3
@emobg7771
@emobg7771 7 ай бұрын
How can I make the Laravel button in the left top corner to redirect me to my website home page?
@exeis1052
@exeis1052 8 ай бұрын
I've done something dumb and it's showing this error, Is there any process to unistall filament and re-install it? if no then how do i fix this problem? public static function make(): static 16▕ { ➜ 17▕ return new static('No default Filament panel is set. You may do this with the `default()` method inside a Filament provider\'s `panel()` configuration.'); 18▕ }
@user-sb9jw3jl2s
@user-sb9jw3jl2s 5 ай бұрын
hi! I can't connect with my jetstream code on the admin panel, can you help me?
@HamadAbdulla_7
@HamadAbdulla_7 11 ай бұрын
thinks Boss
@yelocode
@yelocode 11 ай бұрын
Thanks for watching Hamad
@jhalmu
@jhalmu 11 ай бұрын
Thanks for these. I have to just figure out why editing wants post_tag and I have tag_post in my database... migration file is good, have migrated fresh and seeded again... SELECT `tags`.*, `post_tag`.`post_id` AS `pivot_post_id`, `post_tag`.`tag_id` AS `pivot_tag_id` FROM `tags` INNER JOIN `post_tag` ON `tags`.`id` = `post_tag`.`tag_id` WHERE `post_tag`.`post_id` = 1
@jhalmu
@jhalmu 11 ай бұрын
If I take this away it works: ->relationship('tags', 'title')
@jhalmu
@jhalmu 11 ай бұрын
OK I changed it to: Select::make('author_id') ->label('Author') ->options(User::all()->pluck('name', 'id')) ->searchable() Which is better anyway. But strange still. That too do not work.
@jhalmu
@jhalmu 11 ай бұрын
Well, I just made new migration for post_tag so I can continue. Sorry spamming here :)
@yelocode
@yelocode 11 ай бұрын
Thanks for watching. The default convention in laravel is to have pivot table name, ordered alphabetically. So that is why I used category_post, since c comes before p. If you use this convention laravel can then automatically detect your table, but if you are not using this convention you can then tell laravel your table name manually and it should solve the issue something like bellow should work: public function tags() { return $this->belongsToMany(Tag::class,'tag_post'); } This is required because, laravel doesn't have a way to know your table name.
@yelocode
@yelocode 11 ай бұрын
Select::make('author_id') ->label('Author') ->options(User::all()->pluck('name', 'id')) ->searchable() This solution will work, but because it's loading all the users in the database, if you have a large table with 10k or so uses for example, it will slow down your application. When using the relationship, filament will only load what you have searched for. So it should be faster on larger tables.
@quamenass552
@quamenass552 2 ай бұрын
please guys i am getting this error after working on the creating post with the Admin page SQLSTATE[HY000]: General error: 1364 Field 'user_id' doesn't have a default value i need help
@yelocode
@yelocode 2 ай бұрын
There is a mistake in this episode causing this error. we fix it in future eps. Thanks for watching
@yamonemyatmoe2417
@yamonemyatmoe2417 10 ай бұрын
I'm following your tutorial starting for ep 1. When i create post I have an error "SQLSTATE[HY000]: General error: 1364 Field 'user_id' doesn't have a default value" . Normally in laravel, Auth()->id works but in this case I canno't find what's wrong. How can I solve this issue? Thanks for creating valuable tutorials
@yelocode
@yelocode 10 ай бұрын
Thanks for watching. It might be due to $fillable inside your User Model class. Check if user_id is there. I have had a similar issue in the past and it's usually due to this reason. If not, I have the full code on github, maybe you can double check it with the working version to see what could be missing. github.com/yelocode/laravel-blog-project
@yamonemyatmoe2417
@yamonemyatmoe2417 10 ай бұрын
@@yelocode thank you sir, this is my coding error
@AntonioSequeira-me2xg
@AntonioSequeira-me2xg 9 ай бұрын
@@yelocode Thanks for your tutorial. great job. I was following it but got stuck with this issue. Only solved by changing the Select name: Select::make('user_id'). Am I missing something else?
@yelocode
@yelocode 9 ай бұрын
​@@AntonioSequeira-me2xgThanks for watching. That is an issue in the code, it's something I fix in upcoming episodes.
@abdulrahmanalharthy9335
@abdulrahmanalharthy9335 10 ай бұрын
Hello, can you help? I am getting this error: SELECT `categories`.*, `category_post`.`post_id` AS `pivot_post_id`, `category_post`.`category_id` AS `pivot_category_id` FROM `categories` INNER JOIN `category_post` ON `categories`.`id` = `category_post`.`category_id` WHERE `category_post`.`post_id` = 1 I followed your steps exactly, but I got this error after I added the relationships.
@abdulrahmanalharthy9335
@abdulrahmanalharthy9335 10 ай бұрын
Thanks, I found I wrote the relationships wrong .. :)
@eramitgupta271
@eramitgupta271 11 ай бұрын
abc livewire 3 Laravel data attribute how to get value
@yelocode
@yelocode 11 ай бұрын
Need to add wire:mode to the and add a value something like below: abc
SCHOOLBOY. Последняя часть🤓
00:15
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 13 МЛН
Fortunately, Ultraman protects me  #shorts #ultraman #ultramantiga #liveaction
00:10
My Cheetos🍕PIZZA #cooking #shorts
00:43
BANKII
Рет қаралды 27 МЛН
you STILL need a website RIGHT NOW!! (yes, even in 2024)
19:15
NetworkChuck
Рет қаралды 419 М.
Post Comments | Build Blog with Laravel, Livewire & Filament #12
22:35
Filament Tables with Livewire: Full Page Component! ✨
22:45
Laravel Roles and Permissions: All CORE Things You Need To Know
16:32
Laravel Daily
Рет қаралды 219 М.
Laravel Filament Admin Panel: [4] Roles & Relation Manager
13:01
Designated Coder
Рет қаралды 11 М.
SCHOOLBOY. Последняя часть🤓
00:15
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 13 МЛН