I can not found blade from resources. But website working - laravel

#section('contents') <app-employee-list></app-employee-list> #endsection
How I can get the full html structure form this? I can not found full code. but website is working.

This maybe a vue component, you can find it in this path
resources/js/components
OR it may be a laravel component, you can find it in this path
resources/views/components

Related

Laravel 8 Livewire wire:click:prevent Not Working

Please Someone please I am in the middle of my final year project but this is not working I am trying for 3 days I am new so I don't know how to ask a question so if you need something please ask me Thanks
This is the view for Shop and i have used Composer require Hardevine/shoppingcart
This is the ShopComponent for Shop
When I ran Laravel 8 on IIS, I had a similar problem. The problem was that the browser couldn't access some of the livewire js files, and the solution was:
Go to D:\Projects\Laravel\laravel8ecommerce\vendor\livewire\livewire\config\livewire.php
and set
'asset_url' => "your_url",
and the problem was disappeared.
I had same problem. To solve this issue what I did was enclose my blade template files with a <div> containing an id="main" like so:
<div id="main">
your blade template code
<div>
Instead Of This
wire:click:prevent=“store({{$product->id}},’{{$product->name}}’,{{$product->regular_price}})”
You need to use this in your blade file
#livewireStyles
your code will be in this area
#livewireScripts
Try This For Calling Store Function
wire:click.prevent="store({{$product->id}},{{$product->name}},{{$product->regular_price}})”
Or
wire:click="store({{$product->id}},{{$product->name}},{{$product->regular_price}})”
My solution was based on #KumTem answer
Inside the livewire blades located at app\resources\views\livewire\sample_blade.php
<div id="main">
... templates here
</div>

Laravel how can using the require file

Laravel how can I use the require file when using #section('content') method, how can I require the file into the this?
I want to using the menu bar, but I don't know how to separate it.
I have this code
<div class="links">
About Me
Employment History
News
Blog
Nova
Forge
Vapor
GitHub
</div>
can independent to menu.php
Make menu.blade.php with this code in your views directory.
In place of code write #include('menu')
If location of file is different then #include('path-to-file') will be loaded.
In Laravel blade you can use #include('file path')
You can use yield() to solve the problem.

Laravel React-router 404 for Resource files (CSS/JS)

I'm working with Laravel (5.6) and React (16.4.1+react-router) on a project, and got into a problem maybe some of you having similar problem, so I wonder we could get some ideas. Recently I have found a solution for refreshing error (404) here: How to use React Router with Laravel? and one of the soulutions solved /app/{anything} problem, too.
Now my problem is with resource files (/css, /js) from /public folder. I tried to do a workaround with the same regex as /app =>
Route::get( '/{path?}', function() {
return view( 'home' );
})->where('path', '^((?!app|api|css|js).)*$');
but it's still not working as expected. As I read, we must put this snippet after all routes we included in our app, because of Laravel's caching mechanism, but it's not working with neither /css, neither /js resource files in /public folder > but works with /api and /app routes, and anything I add before /{path?}.
Is there any solutions for this? What am I doing wrong?
Thanks for any help,
LeFizzy.
I think I've found a solution for this, and I thought I must share this with others looking for this. First, it was by a mistake. In the home.blade.php view I linked my resource files incorrectly, like this: <link rel="stylesheet" href="http://mydomain.something/css/styles.css" /> and that's why it didn't find the route, and matched with /{path?/ - so it's actually rendered the home view rather than returning the resource file.
For this, Laravel offers a solution for this by looking for your assets in /public folder, just by linking your files simple like: <link rel="stylesheet" type="text/css" href="{{asset('css/styles.css')}}" /> and almost same solution for JS (local) assets: <script src="{{asset('js/app.js')}}" ></script>.
To mention, you should link external (from other networks) like I did with my Laravel app which didn't worked due to the problem I asked for.
Good luck with it. :)

how can i customiz the laravel 5.1 Login and register view pages?

im using the laravel 5.1 and building web app
i just bought HTML theme and directly copy all the css and Js files to public/assets ( not using any task runner such as gulp or grunt). i try to customize the login and register view page and if i use the default routing its fail to load the js and CSS ( just load plain HTML ) but if i point it directly by
Route::get('login','AuthController#getLogin')
its working . how can i fix the JS and CSS problem ?
*all the other pages works right and load the CSS and JS *
here are the screen shots from other pages and login page :
here is from my login page that fail to load :
if i use route to directly link to the page not passing through the Auth controller and after submit send data to login function ( like simple normal forms) its working but if goes through the controller system its fail . also if i use :
Route:resource('contact','contactcontroller')
my contact pages such as index, create , etc all are fail to load CSS but if i directly link to them like:
Route:get('contact','contactController#index')
it will successfully load the CSS and my page will be shows fine .
this question may help you with that !
Laravel stylesheets and javascript don't load for non-base routes
BTW : look at your page with firefox(chrome) Inspect Element Or Firebug to see the http requests!
Try using this way script and style link
{!! HTML::script('js/bootstrap.min.js') !!}
{!! HTML::style('css/bootstrap.min.css') !!}
<link href="{{URL::asset('../assets/css/bootstrap.css')}}" rel="stylesheet">
<script src="{{URL::asset('../assets/js/jquery.js')}}"></script>
I use these methods works 10/10.

Including CSS in Laravel 5 or 4.3

TL;DR: What is the correct way to link to a stylesheet in Laravel 5?
Background:
I'm using the dev version of Laravel 4.3 (5) because I want to use Socialite, and it makes sense to develop with that from the start. I am having a problem getting templates transferred from 4.2
I've moved my blade layout files to the new directory structure (resources/templates) and placed my CSS in the public/css/ folder.
When I load my route /test/ all I get is "Whoops, looks like something went wrong."
For testing purposes I've removed all blade layout syntax from my layouts - the raw HTML works, but there is no styling (as there is no linked stylesheet). That tells me the routes, views and controllers work.
The problem:
In my layouts, if I remove the following, the layouts work:
{{ HTML::style('css/bootstrap.min.css') }}
{{ HTML::style('css/style.css') }}
Question:
What is the correct location and syntax for Blade Stylesheet inclusion in Laravel 5 and what I should be using instead?
The HtmlBuilder has been removed from Laravel's core, so HTML::style() is no longer available.
If you want to use it in laravel 5, add the following to your composer.json file, under the require key:
"laravelcollective/html": "~5.0"
Also note, since HTML::style() returns HTML code, you don't want it escaped. Use the raw brackets:
{!! HTML::style('css/style.css') !!}
Adding to #joseph's answer, for the users preferring not to switch to the new syntax, you can use
Blade::setRawTags('{{', '}}');
and continue with the old syntax . this can be set almost anywhere, but a better choice would be a service provider, say legacy service provide for l4 . you can find further discussion on this at laracasts, where you can find taylor otwells thoughts on this .
If you want to use plain HTML then use like this-
<link rel="stylesheet" href="/css/folder/style.css">

Resources