Giter Club home page Giter Club logo

laravel-analysis's Introduction

Laravel Logo

πŸš€ Web-Artisan Engineering πŸ€΅β€β™‚

since 2 April,2024

What's this about? πŸ€”

I've crafted this for those who have a deep love for PHP. It's not just for the framework users, but also for those curious about the magic behind this popular PHP framework.

This serves as an understanding of how Laravel works, an operational tutorial, and offers unique ways to optimize along the way. You're welcome to delve deeper into Laravel and advance your skills.

So, I'm eager and grateful to share the inner workings of Laravel with you fella!

My Thoughts πŸ’­:

Big thanks to @taylorotwell for making Laravel framework accessible to all. If you're looking for someone to follow or sponsor, he's a great choice!

image

"Make developers' lives easier, and you'll be heaven-bound for sure." β€” Yours Truly

Contributions Welcome! πŸŽ‰

Laravel is a vast PHP framework with a plethora of features and technologies. I warmly welcome all corrections, suggestions, and new ideas to this analysis. Together, let's help fellow web-artisans better understand this framework.

Let's Get Set Up πŸ› οΈ

Blueprint πŸ—ΊοΈ

Installing Laravel:

First off, according to the official Laravel documentation, you'll need to have PHP and Composer installed on your system to create and use Laravel projects.

image

To create a new Laravel project, use this command:

composer create-project laravel/laravel:^11.0 laravel-project

Alternatively, you can use the Laravel installer:

composer global require laravel/installer
laravel new laravel-project

If you're wondering what Composer is, it's an application-level dependency manager for PHP. Check out Composer's official website for more info.

Another Way:

For the geeks among us, here's another method:

git clone https://github.com/laravel/laravel.git
cd laravel
composer install

Using this method, you'll need to change the file .env-example to .env, which contains the environment variables for your application.

Notice that the vendor directory is not present initially. After running the composer command, the vendor directory will be created, containing the composer dependencies. We'll explore this further later on.

Setting Up the Project:

By default, Laravel uses sqlite database. However, for this analysis, we'll use mysql:

Update the .env file as follows:

Before:

DB_CONNECTION=sqlite
# DB_HOST=127.0.0.1
# DB_PORT=3306
# DB_DATABASE=laravel
# DB_USERNAME=root
# DB_PASSWORD=

After:

DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=

Assuming you have a database called laravel, customize these credentials as needed.

Ensure you've created your database using mariadb or phpmyadmin.

Next, run this command to initialize the pre-defined tables that come with Laravel, such as session storage:

php artisan migrate

Testing the Configuration:

php artisan serve

By default, Laravel listens on port 8000. After running this command, open your browser and go to http:localhost:8000 to see the default page. image

Laravel's Basic Tree:

The tree is quite large, so I've placed it in a separate file. You can view the Laravel Tree here.

Let's Dive In πŸŠβ€β™‚οΈ

Now that you've seen Laravel's default page, let's delve into what's behind the scenes.

We'll start with the artisan file, here.

Jump to Your Interest πŸš€

Feel free to explore my the whole roadmap.

License

MIT

laravel-analysis's People

Contributors

isaka-james avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.