Skip to content
Advertisement

how could I link my HTML project to laravel? [closed]

I’m trying to create a webpage using laravel but there’s not a lot of info online on how to actually set up everything together. I already downloaded ui:auth and there’s already the login option in the laravel welcome page, my question is how do I link this to my HTML page? I already tried looking up for a file where the login info might be but whenever I link it in my HTML proyect it simply links to the raw file. So I must be doing something wrong. any help at all?

Advertisement

Answer

Have a read through the basics section on the docs, good ones that you’d need to use initially to get started are:

In the simplest way possible, you’ll define in your routes a url path that you want to define, and then pass in the controller and method it is refering to. You can put in some basic ‘business logic’ (basically server logic on data) in there.

Then the controller will return a view, with view('some.blade.file') possible with some data using ->with('data', $data) if you want.

Then in your view you will have your html, which is actually blade syntax, which under the hood gets complied to php, and then that gets complied to the raw html your browser sees when hitting that route.

You can stitch together blade files so they extend off other blade files, and you can have a blade file that adds in the auth nav bar if that’s what you want.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement