I am using laravel auth for login, registration and password reset.
It has generated all views and I have customized everything and it works.
Now I want to customize the email templates, but I have no clue where they are and what the best practise is to do it.
They are not in resources/views/vendor ... .I do not have the vendor folder inside resources/views. I only have the sites there.
php artisan vendor:publish --tag=laravel-mail
now u have resources/views/vendor/mail
css is inside themes folder called default.css
i think u can figure it out from there. Basically its just blade components
Related
I am quite new to Livewire and I feel a little bit confused about its folder structure.
I use the classic Laravel folder structure for my views and I put the components under the /resources/views folder; now with Livewire it seems that I am forced to put my components under /resources/views/livewire folder otherwise the component throws an error.
I also tried to change the view_path in my config/livewire.php file to resource_path('views'), instead of resource_path('views/livewire'), but it doesn't work.
The result is a messy structure like the following, where the users' components are in a different folder and I have to go back and forth to find what I want.
Wouldn't it be possibile to remove the /resources/views/livewire folder and put the components under the relative folder they belong to?
resources
views
users
index.blade.php
livewire
users
table.blade.php
the answer is the config file /config/livewire.php
'view_path' => resource_path('views/livewire'),
Just make sure you update all the Livewire class files views in their render function and that you clear any stale config information
php artisan cache:clear
edit: I have tested this and have regular Laravel blades along side livewire ones.
My Laravel installation is in a subfolder/subapp. I then installed Backpack 4.1. Url of backpack login is something like http://example.test/laravel/admin/login.
My Laravel is running fine as a second app in the subfolder (I used nginx to manage the main app and the laravel app as second app in sub-folder).
But the backpack page is not loading the CSS and JS files as /public/ of laravel is missing in the path.
I tried to add ASSET_URL=public in .env of laravel. But did not work.
Need help on this.
Thank you.
Can you help me on how to customize the default Page Expired page in Laravel?
BTW, I'm new to Laravel.
There's a way to override this view. All you need to do is create 419.blade.php file inside the resources/views/errors folder.
If you need to find the Laravel's default 419.blade.php file, you can publish vendor files:
php artisan vendor:publish --tag=laravel-errors
My project crashes on login screen. It tries to get password.request route which it does not see. In routing, there is of course
Auth::routes();
but I did add some other stuff that uses authentication mechanisms. I copied remember password views and controllers from vendors and renamed them to reuse for other purposes.
To be honest I don't even know how to debug missing route. Any help?
You shouldn't have to copy views and controllers from the vendors folder manually if you're doing things with Laravel. Instead run php artisan make:auth in a console. This command will copy the necessary auth blade templates and update your routes/web.php to suit. There is some more info here in the official docs on Laravel authentication.
Also, if you haven't already, you'll need to run migrations by running php artisan migrate in a console. This will create the users and password_resets tables needed to allow registration, login and password recovery.
If you're still having trouble and want to debug things more, make sure you set APP_DEBUG=true inside your .env file in the projects root path. This should record a stack trace in storage/logs/laravel.log when an error occurs.
Fairly new to Laravel here and I'm struggling to understand how to make Laravel 5.2 aware of where it resides. Here's the issue:
I set up auth using php artisan make:auth, and can now see the lovely landing page, as well as login and register links in the menu. The problem is that these links don't go to the right place. They point to /login and /register in the code respectively, which translates into http://localhost/login or http://localhost/register. But since I'm not on a production site yet and am developing locally, my website resides at http://localhost/projectname/public.
I've gone into config/app.php and tried various values for the URL parameter, but these have no effect.
What can I do to get these links to reflect the full site URL, without manually entering it each time?
you can run the development server in laravel using this command
php artisan serve
Did you try that?
Use laravel url function:
{{ url().'/login' }}