<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>laravel &#8211; Best DevOps</title>
	<atom:link href="https://www.bestdevops.com/tag/laravel/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.bestdevops.com</link>
	<description>Lets Learn, Do it &#38; Share! Thats a Best DevOps!!!</description>
	<lastBuildDate>Wed, 28 May 2025 06:29:19 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.3</generator>
	<item>
		<title>Mastering Laravel: Architecture, Use Cases, Workflow, and Getting Started Guide</title>
		<link>https://www.bestdevops.com/mastering-laravel-architecture-use-cases-workflow-and-getting-started-guide/</link>
					<comments>https://www.bestdevops.com/mastering-laravel-architecture-use-cases-workflow-and-getting-started-guide/#respond</comments>
		
		<dc:creator><![CDATA[vijay1 vijay1]]></dc:creator>
		<pubDate>Wed, 28 May 2025 06:29:16 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<category><![CDATA[BladeTemplates]]></category>
		<category><![CDATA[FullStackDevelopment]]></category>
		<category><![CDATA[laravel]]></category>
		<category><![CDATA[ModernPHP]]></category>
		<category><![CDATA[MVCFramework]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[WebDevelopment]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=31413</guid>

					<description><![CDATA[What is Laravel? Laravel is a modern, open-source PHP framework designed for building robust, maintainable, and scalable web applications. Created [&#8230;]]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="1024" height="582" src="https://www.bestdevops.com/wp-content/uploads/2025/05/image-102.png" alt="" class="wp-image-31419" srcset="https://www.bestdevops.com/wp-content/uploads/2025/05/image-102.png 1024w, https://www.bestdevops.com/wp-content/uploads/2025/05/image-102-300x171.png 300w, https://www.bestdevops.com/wp-content/uploads/2025/05/image-102-768x437.png 768w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">What is Laravel?</h2>



<p class="wp-block-paragraph">Laravel is a <strong>modern, open-source PHP framework</strong> designed for building robust, maintainable, and scalable web applications. Created by Taylor Otwell and released in 2011, Laravel has quickly become one of the most popular PHP frameworks worldwide, renowned for its elegant syntax, developer-friendly tools, and rich ecosystem.</p>



<p class="wp-block-paragraph">Laravel is built on the <strong>Model-View-Controller (MVC)</strong> architectural pattern, which separates application logic (Model), user interface (View), and request handling (Controller). This separation of concerns improves code organization and facilitates collaboration.</p>



<p class="wp-block-paragraph">Laravel abstracts many common web development tasks — routing, authentication, sessions, caching, database interactions, and more — providing an expressive and powerful syntax that allows developers to focus on application-specific logic rather than boilerplate code.</p>



<p class="wp-block-paragraph">Additionally, Laravel integrates seamlessly with modern frontend tools, REST APIs, queues, task scheduling, real-time event broadcasting, and testing frameworks, making it ideal for both simple websites and complex enterprise applications.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">What are the Major Use Cases of Laravel?</h2>



<p class="wp-block-paragraph">Laravel’s versatility and comprehensive feature set make it suitable for a wide variety of application types and industries:</p>



<h3 class="wp-block-heading">1. <strong>Content Management Systems (CMS) and Blogs</strong></h3>



<p class="wp-block-paragraph">Laravel’s modular structure, routing flexibility, and templating engine (Blade) make it an excellent choice for building content-heavy platforms, blogs, and CMS solutions where dynamic content management and user roles are essential.</p>



<h3 class="wp-block-heading">2. <strong>E-commerce Applications</strong></h3>



<p class="wp-block-paragraph">Robust e-commerce platforms demand complex features like product catalogs, shopping carts, payment gateways, order management, and customer accounts. Laravel offers built-in tools for handling authentication, validation, queues, and notifications, streamlining the development of e-commerce websites.</p>



<h3 class="wp-block-heading">3. <strong>Enterprise-Level Applications</strong></h3>



<p class="wp-block-paragraph">Enterprises often require complex applications involving workflow automation, reporting, multi-user role management, and integration with legacy systems. Laravel’s architecture supports building scalable and maintainable business applications with features like service containers and event-driven design.</p>



<h3 class="wp-block-heading">4. <strong>RESTful API Development</strong></h3>



<p class="wp-block-paragraph">Laravel makes building RESTful APIs straightforward through resource controllers, API authentication (via Laravel Sanctum or Passport), and rate limiting middleware. It supports JSON responses natively and integrates easily with frontend frameworks like React, Vue.js, and Angular.</p>



<h3 class="wp-block-heading">5. <strong>Social Networks and Real-Time Apps</strong></h3>



<p class="wp-block-paragraph">Features such as real-time event broadcasting (Laravel Echo), notifications, and task queues make Laravel suitable for building social platforms and interactive applications requiring real-time communication.</p>



<h3 class="wp-block-heading">6. <strong>Microservices and Modular Systems</strong></h3>



<p class="wp-block-paragraph">Laravel’s service container and package system facilitate modular development, making it possible to build microservices architectures or component-based applications.</p>



<h3 class="wp-block-heading">7. <strong>Task Automation and Background Jobs</strong></h3>



<p class="wp-block-paragraph">Laravel includes a native scheduler and robust queue system, allowing background processing of tasks like emails, report generation, and API calls asynchronously to improve performance.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">How Laravel Works Along with Architecture?</h2>



<figure class="wp-block-image size-full"><img decoding="async" width="1000" height="580" src="https://www.bestdevops.com/wp-content/uploads/2025/05/image-103.png" alt="" class="wp-image-31420" srcset="https://www.bestdevops.com/wp-content/uploads/2025/05/image-103.png 1000w, https://www.bestdevops.com/wp-content/uploads/2025/05/image-103-300x174.png 300w, https://www.bestdevops.com/wp-content/uploads/2025/05/image-103-768x445.png 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></figure>



<p class="wp-block-paragraph">Laravel’s architecture is a well-designed blend of established software design principles and modern PHP features, structured around several key components:</p>



<h3 class="wp-block-heading">1. <strong>Model-View-Controller (MVC) Pattern</strong></h3>



<ul class="wp-block-list">
<li><strong>Model:</strong> Represents the data layer, typically using Laravel’s <strong>Eloquent ORM</strong> to interact with databases via expressive ActiveRecord syntax. Models define database tables, relationships, and business logic related to data.</li>



<li><strong>View:</strong> Uses Laravel’s <strong>Blade templating engine</strong> to render HTML dynamically. Blade supports template inheritance, components, and simple PHP embedding, enabling clean and maintainable frontend code.</li>



<li><strong>Controller:</strong> Handles user input and requests, coordinates with models to retrieve or store data, and returns responses by rendering views or JSON for APIs.</li>
</ul>



<h3 class="wp-block-heading">2. <strong>Routing Layer</strong></h3>



<p class="wp-block-paragraph">Laravel’s routing system maps HTTP requests to controllers or closure functions. It supports RESTful routing, route groups, middleware, named routes, and route model binding, offering flexible URL handling.</p>



<h3 class="wp-block-heading">3. <strong>Service Container and Dependency Injection</strong></h3>



<p class="wp-block-paragraph">The <strong>service container</strong> is Laravel’s powerful tool for managing class dependencies and performing dependency injection. It promotes loose coupling and testability by automatically injecting required services into controllers or other classes.</p>



<h3 class="wp-block-heading">4. <strong>Middleware</strong></h3>



<p class="wp-block-paragraph">Middleware layers act as filters for HTTP requests, enabling features like authentication, CSRF protection, logging, and CORS headers by processing requests before they reach routes or controllers.</p>



<h3 class="wp-block-heading">5. <strong>Database and Eloquent ORM</strong></h3>



<p class="wp-block-paragraph">Laravel supports multiple database systems and provides:</p>



<ul class="wp-block-list">
<li><strong>Migrations:</strong> Version-controlled schema changes.</li>



<li><strong>Query Builder:</strong> Fluent interface for database queries.</li>



<li><strong>Eloquent ORM:</strong> ActiveRecord implementation that maps models to tables and supports complex relationships (one-to-many, many-to-many, polymorphic).</li>
</ul>



<h3 class="wp-block-heading">6. <strong>Queues and Task Scheduling</strong></h3>



<p class="wp-block-paragraph">Queues enable deferring time-consuming tasks (emails, notifications) using various backends like Redis or database queues. The scheduler allows cron-like task automation within Laravel’s ecosystem.</p>



<h3 class="wp-block-heading">7. <strong>Event System</strong></h3>



<p class="wp-block-paragraph">Laravel’s event broadcasting supports decoupled event-driven programming, enabling real-time notifications and asynchronous processing.</p>



<h3 class="wp-block-heading">8. <strong>Security</strong></h3>



<p class="wp-block-paragraph">Laravel includes built-in mechanisms for password hashing, input validation, SQL injection prevention, cross-site scripting (XSS) protection, and CSRF tokens.</p>



<h3 class="wp-block-heading">9. <strong>Testing</strong></h3>



<p class="wp-block-paragraph">Laravel integrates PHPUnit and provides helpers for HTTP testing, database transactions, and mocking services, facilitating robust automated testing.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">What are the Basic Workflow of Laravel?</h2>



<p class="wp-block-paragraph">The typical Laravel development workflow follows these stages:</p>



<h3 class="wp-block-heading">1. <strong>Project Setup</strong></h3>



<p class="wp-block-paragraph">Initialize a new Laravel project using Composer and configure environment variables.</p>



<h3 class="wp-block-heading">2. <strong>Routing and Controllers</strong></h3>



<p class="wp-block-paragraph">Define routes in <code>routes/web.php</code> or <code>routes/api.php</code> and link them to controller methods that handle requests.</p>



<h3 class="wp-block-heading">3. <strong>Database Schema Design</strong></h3>



<p class="wp-block-paragraph">Define migrations to create and modify database tables and run migrations to update the database schema.</p>



<h3 class="wp-block-heading">4. <strong>Model Creation</strong></h3>



<p class="wp-block-paragraph">Create Eloquent models corresponding to database tables, defining relationships and business logic.</p>



<h3 class="wp-block-heading">5. <strong>View Development</strong></h3>



<p class="wp-block-paragraph">Design Blade templates to render data dynamically and create reusable components.</p>



<h3 class="wp-block-heading">6. <strong>Implement Business Logic</strong></h3>



<p class="wp-block-paragraph">Handle data manipulation in controllers and models, applying validation and authorization rules.</p>



<h3 class="wp-block-heading">7. <strong>Background Processing</strong></h3>



<p class="wp-block-paragraph">Configure queues and schedule tasks for asynchronous processing.</p>



<h3 class="wp-block-heading">8. <strong>Testing</strong></h3>



<p class="wp-block-paragraph">Write and execute unit and feature tests to verify application correctness.</p>



<h3 class="wp-block-heading">9. <strong>Deployment</strong></h3>



<p class="wp-block-paragraph">Prepare the application for production with caching, optimization, and environment configuration.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">Step-by-Step Getting Started Guide for Laravel</h2>



<h3 class="wp-block-heading">Step 1: Install Composer</h3>



<p class="wp-block-paragraph">Ensure Composer is installed for PHP dependency management.</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">curl -sS https:<span class="hljs-comment">//getcomposer.org/installer | php</span>
sudo mv composer.phar /usr/local/bin/composer
</code></span></pre>


<h3 class="wp-block-heading">Step 2: Create a New Laravel Project</h3>



<p class="wp-block-paragraph">Create a fresh Laravel project via Composer:</p>


<pre class="wp-block-code"><span><code class="hljs">composer create-project --prefer-dist laravel/laravel myproject
cd myproject
</code></span></pre>


<h3 class="wp-block-heading">Step 3: Configure Environment Variables</h3>



<p class="wp-block-paragraph">Copy <code>.env.example</code> to <code>.env</code> and update database credentials and other settings.</p>


<pre class="wp-block-code"><span><code class="hljs">DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel_db
DB_USERNAME=root
DB_PASSWORD=secret
</code></span></pre>


<h3 class="wp-block-heading">Step 4: Generate Application Key</h3>



<p class="wp-block-paragraph">Run the key generator to set the application encryption key:</p>


<pre class="wp-block-code"><span><code class="hljs language-css"><span class="hljs-selector-tag">php</span> <span class="hljs-selector-tag">artisan</span> <span class="hljs-selector-tag">key</span><span class="hljs-selector-pseudo">:generate</span>
</code></span></pre>


<h3 class="wp-block-heading">Step 5: Run Database Migrations</h3>



<p class="wp-block-paragraph">Create the initial database schema:</p>


<pre class="wp-block-code"><span><code class="hljs">php artisan migrate
</code></span></pre>


<h3 class="wp-block-heading">Step 6: Serve the Application</h3>



<p class="wp-block-paragraph">Start the built-in development server:</p>


<pre class="wp-block-code"><span><code class="hljs">php artisan serve
</code></span></pre>


<p class="wp-block-paragraph">Visit <code>http://127.0.0.1:8000</code> in your browser.</p>



<h3 class="wp-block-heading">Step 7: Create a Model and Controller</h3>



<p class="wp-block-paragraph">Generate a model and corresponding controller:</p>


<pre class="wp-block-code"><span><code class="hljs language-css"><span class="hljs-selector-tag">php</span> <span class="hljs-selector-tag">artisan</span> <span class="hljs-selector-tag">make</span><span class="hljs-selector-pseudo">:model</span> <span class="hljs-selector-tag">Post</span> <span class="hljs-selector-tag">-m</span>
<span class="hljs-selector-tag">php</span> <span class="hljs-selector-tag">artisan</span> <span class="hljs-selector-tag">make</span><span class="hljs-selector-pseudo">:controller</span> <span class="hljs-selector-tag">PostController</span> <span class="hljs-selector-tag">--resource</span>
</code></span></pre>


<p class="wp-block-paragraph">The <code>-m</code> flag creates a migration file.</p>



<h3 class="wp-block-heading">Step 8: Define Database Schema</h3>



<p class="wp-block-paragraph">Edit the migration file in <code>database/migrations</code> to define columns:</p>


<pre class="wp-block-code"><span><code class="hljs language-php">Schema::create(<span class="hljs-string">'posts'</span>, <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-params">(Blueprint $table)</span> </span>{
    $table-&gt;id();
    $table-&gt;string(<span class="hljs-string">'title'</span>);
    $table-&gt;text(<span class="hljs-string">'content'</span>);
    $table-&gt;timestamps();
});
</code></span></pre>


<p class="wp-block-paragraph">Run migrations:</p>


<pre class="wp-block-code"><span><code class="hljs">php artisan migrate
</code></span></pre>


<h3 class="wp-block-heading">Step 9: Define Routes</h3>



<p class="wp-block-paragraph">In <code>routes/web.php</code>:</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">Route::resource(<span class="hljs-string">'posts'</span>, <span class="hljs-attr">PostController</span>::<span class="hljs-class"><span class="hljs-keyword">class</span>)</span>;
</code></span></pre>


<h3 class="wp-block-heading">Step 10: Implement Controller Logic</h3>



<p class="wp-block-paragraph">Populate controller methods (<code>index</code>, <code>show</code>, <code>store</code>, etc.) to interact with the Post model.</p>



<h3 class="wp-block-heading">Step 11: Create Blade Views</h3>



<p class="wp-block-paragraph">In <code>resources/views/posts/</code>, create Blade templates (<code>index.blade.php</code>, <code>show.blade.php</code>, <code>create.blade.php</code>).</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.bestdevops.com/mastering-laravel-architecture-use-cases-workflow-and-getting-started-guide/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Getting Started with Laravel: Key Concepts, Use Cases, Architecture, and Workflow</title>
		<link>https://www.bestdevops.com/getting-started-with-laravel-key-concepts-use-cases-architecture-and-workflow/</link>
					<comments>https://www.bestdevops.com/getting-started-with-laravel-key-concepts-use-cases-architecture-and-workflow/#respond</comments>
		
		<dc:creator><![CDATA[vijay1 vijay1]]></dc:creator>
		<pubDate>Fri, 09 May 2025 11:54:30 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<category><![CDATA[laravel]]></category>
		<category><![CDATA[LaravelGettingStarted]]></category>
		<category><![CDATA[MVCArchitecture]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHPFramework]]></category>
		<category><![CDATA[WebApplication]]></category>
		<category><![CDATA[WebDevelopment]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=31077</guid>

					<description><![CDATA[What is Laravel? Laravel is an open-source PHP web framework designed for building robust, scalable, and modern web applications. It [&#8230;]]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-full"><img decoding="async" width="1000" height="420" src="https://www.bestdevops.com/wp-content/uploads/2025/05/image-22.png" alt="" class="wp-image-31082" srcset="https://www.bestdevops.com/wp-content/uploads/2025/05/image-22.png 1000w, https://www.bestdevops.com/wp-content/uploads/2025/05/image-22-300x126.png 300w, https://www.bestdevops.com/wp-content/uploads/2025/05/image-22-768x323.png 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></figure>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">What is Laravel?</h3>



<p class="wp-block-paragraph"><strong>Laravel</strong> is an open-source PHP web framework designed for building robust, scalable, and modern web applications. It was created by <strong>Taylor Otwell</strong> and released in 2011 to provide an alternative to other PHP frameworks like CodeIgniter and Yii. Laravel is based on the <strong>Model-View-Controller (MVC)</strong> architectural pattern, which helps in organizing the application logic by separating concerns such as data management, user interface, and user interaction. This separation allows for easier development, maintenance, and scaling of applications.</p>



<p class="wp-block-paragraph">Laravel is known for its elegant syntax, developer-friendly tools, and extensive documentation, which makes it a popular choice among web developers. Laravel provides a wide range of features out-of-the-box, including routing, database migrations, authentication, authorization, and more. Its emphasis on clean, readable code, along with built-in support for modern web technologies, makes it suitable for projects ranging from small-scale websites to large enterprise applications.</p>



<p class="wp-block-paragraph">Laravel has gained widespread popularity due to its rich ecosystem of tools and services, including <strong>Laravel Forge</strong> for deployment, <strong>Laravel Vapor</strong> for serverless applications, and <strong>Laravel Echo</strong> for real-time event broadcasting. Laravel also has an integrated <strong>Eloquent ORM</strong> (Object-Relational Mapping) for database management, making it easy to interact with databases and perform CRUD operations.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">What are the Major Use Cases of Laravel?</h3>



<ol class="wp-block-list">
<li><strong>Building Web Applications</strong>:<br>Laravel’s primary use case is building modern web applications. It offers a structured and flexible approach for handling common web development tasks such as routing, authentication, database management, and form handling. Laravel’s simplicity and clean syntax make it a great choice for both small-scale projects and enterprise-level applications.</li>



<li><strong>Content Management Systems (CMS)</strong>:<br>Laravel is frequently used for developing content management systems (CMS) where flexibility and scalability are essential. Laravel’s ability to manage dynamic content and provide an administrative interface through easy-to-use backend tools makes it ideal for creating custom CMS platforms. Popular examples include <strong>OctoberCMS</strong> and <strong>Jigsaw</strong>.</li>



<li><strong>E-commerce Platforms</strong>:<br>Laravel is also well-suited for developing e-commerce websites. With built-in support for managing databases, user authentication, and payment gateways, developers can create fully functional e-commerce solutions. Laravel provides robust tools for building product catalogs, shopping carts, and order management systems. Frameworks like <strong>Bagisto</strong> and <strong>Aimeos</strong> are based on Laravel and provide pre-built e-commerce solutions.</li>



<li><strong>API Development</strong>:<br>Laravel excels at developing RESTful APIs, making it a preferred framework for building APIs for web or mobile applications. Laravel’s routing system and support for authentication (including <strong>OAuth2</strong> and <strong>JWT</strong>) make it easy to build secure and scalable APIs. Laravel’s lightweight nature allows for fast and efficient API development.</li>



<li><strong>Real-Time Applications</strong>:<br>Laravel is also useful for building real-time applications such as chat applications, collaborative platforms, and live notifications. The <strong>Laravel Echo</strong> package allows for event broadcasting, enabling developers to easily implement real-time features in their web applications using WebSockets.</li>



<li><strong>Task Scheduling and Automation</strong>:<br>Laravel includes a built-in task scheduler that allows developers to automate repetitive tasks, such as sending out emails or running background jobs. The <strong>Laravel Scheduler</strong> provides an easy-to-use API for scheduling recurring tasks, which is useful in scenarios where tasks need to run at specific intervals.</li>



<li><strong>Enterprise Applications</strong>:<br>Laravel’s architecture and features make it suitable for large-scale enterprise applications that require complex business logic, large databases, and integration with third-party services. The scalability and flexibility of Laravel make it a popular choice for organizations that require custom-built solutions to meet specific business needs.</li>
</ol>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">How Laravel Works Along with Architecture?</h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="467" src="https://www.bestdevops.com/wp-content/uploads/2025/05/image-23-1024x467.png" alt="" class="wp-image-31083" srcset="https://www.bestdevops.com/wp-content/uploads/2025/05/image-23-1024x467.png 1024w, https://www.bestdevops.com/wp-content/uploads/2025/05/image-23-300x137.png 300w, https://www.bestdevops.com/wp-content/uploads/2025/05/image-23-768x350.png 768w, https://www.bestdevops.com/wp-content/uploads/2025/05/image-23.png 1437w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph">Laravel follows the <strong>Model-View-Controller (MVC)</strong> architecture, which separates the application logic into three primary components:</p>



<ol class="wp-block-list">
<li><strong>Model</strong>:<br>The <strong>Model</strong> is responsible for interacting with the database and handling data-related logic. It represents the business logic and data structure of the application. In Laravel, models are typically associated with a specific database table and allow developers to perform CRUD (Create, Read, Update, Delete) operations using <strong>Eloquent ORM</strong>. Eloquent provides an active record implementation for database interaction, making it easy to retrieve and manipulate data in a database. Example of a Laravel model for the <code>User</code> table: <code>namespace App\Models; use Illuminate\Database\Eloquent\Model; class User extends Model { protected $table = 'users'; }</code></li>



<li><strong>View</strong>:<br>The <strong>View</strong> is responsible for displaying the user interface of the application. In Laravel, views are typically created using <strong>Blade</strong>, Laravel’s templating engine. Blade allows developers to easily combine PHP with HTML to generate dynamic content. Views can be used to display data retrieved by the controller, such as lists of users or posts. Example of a simple Blade view: <code>&lt;h1>Welcome, {{ $user->name }}&lt;/h1> &lt;p>Your email: {{ $user->email }}&lt;/p></code></li>



<li><strong>Controller</strong>:<br>The <strong>Controller</strong> serves as the intermediary between the Model and the View. It receives user input (usually via HTTP requests), interacts with the Model to retrieve or modify data, and then passes the data to the View for rendering. Controllers define the application’s business logic and manage the flow of data. Example of a simple Laravel controller: <code>namespace App\Http\Controllers; use App\Models\User; use Illuminate\Http\Request; class UserController extends Controller { public function index() { $users = User::all(); return view('users.index', compact('users')); } }</code></li>
</ol>



<p class="wp-block-paragraph">In addition to MVC, Laravel also includes several other architectural components and design patterns:</p>



<ul class="wp-block-list">
<li><strong>Routing</strong>: Laravel provides a powerful routing system to map HTTP requests to specific controller actions or routes.</li>



<li><strong>Middleware</strong>: Middleware acts as a filtering mechanism to inspect incoming requests before they reach the controller or the application’s response.</li>



<li><strong>Service Providers</strong>: Service providers are used to bootstrap and configure services and bindings into Laravel’s service container.</li>



<li><strong>Artisan CLI</strong>: Laravel includes a command-line interface, Artisan, which provides a set of helpful commands for tasks like database migrations, routing, and generating boilerplate code.</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">What are the Basic Workflow of Laravel?</h3>



<p class="wp-block-paragraph">Laravel’s workflow involves several key steps, each designed to make development as efficient as possible. Here is an overview of the basic workflow:</p>



<ol class="wp-block-list">
<li><strong>Routing</strong>:<br>When a user sends an HTTP request to a Laravel application, the request is first directed through the application’s routing system. Laravel’s <code>routes/web.php</code> file defines routes that map to specific controller actions or closure functions. Example of a route in Laravel: <code>Route::get('/users', [UserController::class, 'index']);</code></li>



<li><strong>Request Handling</strong>:<br>After routing the request, Laravel processes the request through a series of middleware layers. Middleware functions as filters that can modify the request or perform checks before the request reaches the controller.</li>



<li><strong>Controller Logic</strong>:<br>The request is then passed to the appropriate controller, where the application’s business logic resides. The controller may interact with models to retrieve or modify data and will then pass this data to the view for rendering.</li>



<li><strong>View Rendering</strong>:<br>The controller returns a view (often using Laravel’s Blade templating engine) that contains HTML mixed with data. The view is responsible for presenting the data to the user in a structured format.</li>



<li><strong>Response</strong>:<br>After the view is rendered, Laravel sends the response back to the user’s browser, completing the request-response cycle. The response may include HTML content, JSON data (for APIs), or other types of data.</li>
</ol>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">Step-by-Step Getting Started Guide for Laravel</h3>



<ol class="wp-block-list">
<li><strong>Install Laravel</strong>:<br>The first step in using Laravel is to install it. You can install Laravel using <strong>Composer</strong>, which is a dependency management tool for PHP. To install a new Laravel project, run the following command in your terminal: <code>composer create-project --prefer-dist laravel/laravel your-project-name</code></li>



<li><strong>Set Up Environment</strong>:<br>After installation, navigate to the project folder and configure your environment. The <code>.env</code> file in the Laravel project holds environment-specific configurations such as database connections, app URL, and API keys. Example of <code>.env</code> file configuration: <code>APP_NAME=Laravel APP_ENV=local APP_KEY=base64:your-app-key DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=your_database DB_USERNAME=root DB_PASSWORD=</code></li>



<li><strong>Configure Database</strong>:<br>Set up your database by updating the <code>.env</code> file with your database connection details. Laravel supports various databases such as MySQL, PostgreSQL, SQLite, and SQL Server.</li>



<li><strong>Create a Model</strong>:<br>To interact with the database, create a model using Artisan. For example, to create a <code>User</code> model, run: <code>php artisan make:model User</code></li>



<li><strong>Define Routes</strong>:<br>Define the routes for your application in the <code>routes/web.php</code> file. Routes handle incoming requests and map them to specific controller actions.</li>



<li><strong>Create Controllers</strong>:<br>Controllers contain the logic for handling requests. You can create a controller using the Artisan command: <code>php artisan make:controller UserController</code></li>



<li><strong>Create Views</strong>:<br>Views are stored in the <code>resources/views</code> directory and can be created using Blade templates. Laravel uses Blade to render views dynamically with data passed from controllers.</li>



<li><strong>Run the Application</strong>:<br>You can start the Laravel development server by running: <code>php artisan serve</code> Once the server is running, you can visit <code>http://localhost:8000</code> to view your application.</li>
</ol>
]]></content:encoded>
					
					<wfw:commentRss>https://www.bestdevops.com/getting-started-with-laravel-key-concepts-use-cases-architecture-and-workflow/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Fundamental Tutorials of Laravel</title>
		<link>https://www.bestdevops.com/fundamental-tutorials-of-laravel/</link>
					<comments>https://www.bestdevops.com/fundamental-tutorials-of-laravel/#respond</comments>
		
		<dc:creator><![CDATA[vijaykr123]]></dc:creator>
		<pubDate>Wed, 09 Aug 2023 12:05:12 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<category><![CDATA[Applications]]></category>
		<category><![CDATA[Fundamental]]></category>
		<category><![CDATA[laravel]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=28894</guid>

					<description><![CDATA[What is Laravel? Laravel is a free and open-source PHP web framework, created by Taylor Otwell and intended for the [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">What is Laravel?</h2>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="881" height="661" data-id="28896" src="https://www.bestdevops.com/wp-content/uploads/2023/08/Laravel-post.jpg" alt="" class="wp-image-28896" srcset="https://www.bestdevops.com/wp-content/uploads/2023/08/Laravel-post.jpg 881w, https://www.bestdevops.com/wp-content/uploads/2023/08/Laravel-post-300x225.jpg 300w, https://www.bestdevops.com/wp-content/uploads/2023/08/Laravel-post-768x576.jpg 768w" sizes="auto, (max-width: 881px) 100vw, 881px" /></figure>
</figure>



<p class="wp-block-paragraph">Laravel is a free and open-source PHP web framework, created by Taylor Otwell and intended for the development of web applications following the model–view–controller (MVC) architectural pattern and based on Symfony. </p>



<p class="wp-block-paragraph">Some of the features of Laravel are:</p>



<ul class="wp-block-list">
<li>A modular packaging system with a dedicated dependency manager, different ways for accessing relational databases, utilities that aid in application deployment and maintenance, and its orientation toward syntactic sugar.</li>



<li>A powerful command-line interface (CLI) called Artisan, which can be used to generate new code, migrate databases, and perform other tasks.</li>



<li>A well-documented API that makes it easy to learn and use.</li>



<li>A large and active community of developers who can provide support and help with problems.</li>
</ul>



<h2 class="wp-block-heading">What is top use cases of Laravel?</h2>



<p class="wp-block-paragraph">Laravel is a popular PHP framework that can be used to develop a wide variety of web applications. Here are some of the top use cases of Laravel:</p>



<ul class="wp-block-list">
<li>E-commerce websites: Laravel is a great choice for developing e-commerce websites because it is scalable and secure. Laravel also provides a number of features that are specifically designed for e-commerce websites, such as the ability to create product catalogs, manage orders, and process payments.</li>



<li>Content management systems (CMS): Laravel can be used to develop custom CMSs or to extend existing CMSs. Laravel&#8217;s MVC architecture makes it easy to create a modular and extensible CMS.</li>



<li>Social media applications: Laravel is a good choice for developing social media applications because it is scalable and efficient. Laravel also provides a number of features that are specifically designed for social media applications, such as the ability to handle large amounts of data and to scale to meet demand.</li>



<li>APIs: Laravel can be used to develop APIs for a variety of purposes, such as connecting different systems, providing data to third-party applications, or creating a public-facing API for your application. Laravel&#8217;s API features make it easy to create secure and scalable APIs.</li>



<li>Enterprise applications: Laravel is a good choice for developing enterprise applications because it is scalable, secure, and well-documented. Laravel&#8217;s features make it easy to create complex applications that meet the needs of large organizations.</li>
</ul>



<h2 class="wp-block-heading">What are the features of Laravel?</h2>



<p class="wp-block-paragraph">Laravel is a popular PHP framework that offers a wide range of features that make it a great choice for developing web applications. </p>



<p class="wp-block-paragraph"><strong>Here are some of the most important features of Laravel:</strong></p>



<ul class="wp-block-list">
<li>MVC architecture: Laravel follows the Model-View-Controller (MVC) architectural pattern, which separates the application into three layers: the model, the view, and the controller. This makes the application code more organized and easier to maintain.</li>



<li>Routing: Laravel provides a powerful routing system that makes it easy to define and map URLs to controller actions. This makes it easy to create complex applications with a large number of URLs.</li>



<li>Eloquent ORM: Laravel includes an Eloquent ORM that makes it easy to interact with databases. The Eloquent ORM provides a fluent interface that makes it easy to create, read, update, and delete data from databases.</li>



<li>Artisan CLI: Laravel includes a powerful command-line interface (CLI) called Artisan that can be used to generate new code, migrate databases, and perform other tasks. The Artisan CLI makes it easy to automate tasks and speed up development.</li>



<li>Security: Laravel includes a number of features that make it a secure framework, such as input validation, password hashing, and CSRF protection. These features help to protect your application from common security vulnerabilities.</li>



<li>Testing: Laravel includes a built-in testing framework that makes it easy to test your application. The testing framework provides a number of tools and features that help you to write and run tests quickly and easily.</li>



<li>Documentation: Laravel has excellent documentation that makes it easy to learn and use the framework. The documentation is well-written and comprehensive, and it includes examples and tutorials that can help you get started.</li>



<li>Community: Laravel has a large and active community of developers who are always willing to help with problems and answer questions. This community is a great resource for learning Laravel and getting help when you need it.</li>
</ul>



<h2 class="wp-block-heading">What is the workflow of Laravel?</h2>



<p class="wp-block-paragraph">The workflow of Laravel is a process that is used to develop web applications using the Laravel framework. The workflow is divided into the following steps:</p>



<ul class="wp-block-list">
<li>Routing: The first step is to define the routes for your application. Routes are used to map URLs to controller actions. This is done using the Laravel routing system.</li>



<li>Controllers: Controllers are responsible for handling requests from the user. They are responsible for calling the appropriate model methods and rendering the appropriate view.</li>



<li>Models: Models are responsible for interacting with the database. They provide a layer of abstraction between the application and the database.</li>



<li>Views: Views are responsible for displaying the data to the user. They are typically rendered by the controller.</li>



<li>Testing: Testing is an essential part of the Laravel workflow. Laravel includes a built-in testing framework that makes it easy to write and run tests.</li>
</ul>



<h2 class="wp-block-heading">How Laravel Works &amp; Architecture?</h2>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-2 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="660" height="473" data-id="28895" src="https://www.bestdevops.com/wp-content/uploads/2023/08/MVCFramework1-660x473-1.png" alt="" class="wp-image-28895" srcset="https://www.bestdevops.com/wp-content/uploads/2023/08/MVCFramework1-660x473-1.png 660w, https://www.bestdevops.com/wp-content/uploads/2023/08/MVCFramework1-660x473-1-300x215.png 300w" sizes="auto, (max-width: 660px) 100vw, 660px" /></figure>
</figure>



<p class="wp-block-paragraph">Laravel is a popular PHP framework that follows the Model-View-Controller (MVC) architectural pattern. The MVC pattern divides the application into three layers:</p>



<ul class="wp-block-list">
<li>The Model layer: The model layer is responsible for interacting with the database. It provides a layer of abstraction between the application and the database.</li>



<li>The View layer: The view layer is responsible for displaying the data to the user. It is typically written in Blade, which is a templating language that is designed for Laravel.</li>



<li>The Controller layer: The controller layer is responsible for handling requests from the user. It is responsible for calling the appropriate model methods and rendering the appropriate view.</li>
</ul>



<h2 class="wp-block-heading">How to Install and Configure Laravel?</h2>



<p class="wp-block-paragraph"><strong>Here are the steps on how to install and configure Laravel:</strong></p>



<p class="wp-block-paragraph">1. Install Composer. Composer is a dependency manager for PHP. You can download Composer from the Composer website.</p>



<p class="wp-block-paragraph">2. Install Laravel. You can install Laravel using Composer. To do this, run the following command in your terminal:</p>


<pre class="wp-block-code"><span><code class="hljs">composer create-project --prefer-dist laravel/laravel my-app</code></span></pre>


<p class="wp-block-paragraph">This will create a new Laravel application called my app.</p>



<p class="wp-block-paragraph">3. Configure the application. You need to configure the application before you can start using it. The configuration file is located at config/app.php. In this file, you can set the application name, the database connection details, and other settings.</p>



<p class="wp-block-paragraph">4. Generate a key. Laravel uses a key to encrypt sensitive data. You can generate a key using the following command:</p>


<pre class="wp-block-code"><span><code class="hljs language-css"><span class="hljs-selector-tag">php</span> <span class="hljs-selector-tag">artisan</span> <span class="hljs-selector-tag">key</span><span class="hljs-selector-pseudo">:generate</span></code></span></pre>


<p class="wp-block-paragraph">5. Start the development server. Laravel includes a built-in development server that you can use to test your application. To start the development server, run the following command:<br>php artisan serve</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.bestdevops.com/fundamental-tutorials-of-laravel/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Argument 1 passed to Illuminate\Auth\SessionGuard::login() must implement interface Illuminate\Contracts\Auth\Authenticatable, null given, called in. Solved !</title>
		<link>https://www.bestdevops.com/argument-1-passed-to-illuminateauthsessionguardlogin-must-implement-interface-illuminatecontractsauthauthenticatable-null-given-called-in-solved/</link>
		
		<dc:creator><![CDATA[pradeep]]></dc:creator>
		<pubDate>Thu, 26 Aug 2021 09:46:57 +0000</pubDate>
				<category><![CDATA[Laravel]]></category>
		<category><![CDATA[Authenticatable]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[laravel]]></category>
		<category><![CDATA[socialite]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=19785</guid>

					<description><![CDATA[This usually occurs when using of Laravel Socialite for authentication Socialite In addition to typical, form based authentication, Laravel also [&#8230;]]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="216" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-125-1024x216.png" alt="" class="wp-image-19786" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-125-1024x216.png 1024w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-125-300x63.png 300w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-125-768x162.png 768w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-125-1536x324.png 1536w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-125.png 1542w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph">This usually occurs when using of <strong>Laravel Socialite</strong> for authentication </p>



<h2 class="wp-block-heading" id="introduction">Socialite</h2>



<p class="wp-block-paragraph">In addition to typical, form based authentication, Laravel also provides a simple, convenient way to authenticate with OAuth providers using <a href="https://github.com/laravel/socialite">Laravel Socialite</a>. Socialite currently supports authentication with Facebook, Twitter, LinkedIn, Google, GitHub, GitLab, and Bitbucket.</p>



<h2 class="wp-block-heading">Error</h2>



<p class="wp-block-paragraph"><strong>Argument 1 passed to Illuminate\Auth\SessionGuard::login() must implement interface Illuminate\Contracts\Auth\Authenticatable, null given, called in C:\xampp\htdocs\WrokSpace\professional\vendor\laravel\framework\src\Illuminate\Auth\AuthManager.php on line 297</strong></p>



<h2 class="wp-block-heading">Solution </h2>



<p class="wp-block-paragraph"><strong>Just delete the social provider assigned to that user id from your database table and that&#8217;s it. </strong></p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="206" height="30" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-126.png" alt="" class="wp-image-19787"/></figure>



<p class="wp-block-paragraph">Thankyou </p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Laravel Permissions to set on Storage folder on Linux.</title>
		<link>https://www.bestdevops.com/laravel-permissions-to-set-on-storage-folder-on-linux/</link>
		
		<dc:creator><![CDATA[Sushant Kumar]]></dc:creator>
		<pubDate>Mon, 16 Aug 2021 07:30:00 +0000</pubDate>
				<category><![CDATA[Laravel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[laravel]]></category>
		<category><![CDATA[laravel application]]></category>
		<category><![CDATA[Laravel Permissions]]></category>
		<category><![CDATA[Laravel Permissions on Storage folder]]></category>
		<category><![CDATA[Linux Permissions for Laravel]]></category>
		<category><![CDATA[Storage folder Permissions]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=19025</guid>

					<description><![CDATA[When we Setup laravel project on linux server then we have to give permissions to all folder&#8217;s, sub-folder&#8217;s and files [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">When we Setup laravel project on linux server then we have to give permissions to all folder&#8217;s, sub-folder&#8217;s and files in laravel Storage folder. So, i&#8217;m providing the list of permission which you have to set in storage folder. I&#8217;m providing this list because we can&#8217;t set <strong>777</strong> permission to all folders, if we do then it&#8217;s may be a security concern.</p>



<p class="wp-block-paragraph">So i&#8217;m providing a complete list of each folder&#8217;s and sub-folder&#8217;s permissions.</p>



<ol class="wp-block-list"><li><strong>storage </strong>&#8211; <strong><span class="has-inline-color has-primary-color">755</span></strong>.<br><br></li><li><strong>storage/app</strong> &#8211; <strong><span class="has-inline-color has-primary-color">755</span></strong>.<br><strong>storage/app/public</strong> &#8211; <strong><span class="has-inline-color has-primary-color">755</span></strong>.<br><br></li><li><strong>storage/framework</strong> &#8211; <strong><span class="has-inline-color has-primary-color">755</span></strong>.<br><strong>storage/framework/views</strong> &#8211; <strong><span class="has-inline-color has-primary-color">777</span></strong>.<br><strong>storage/framework/testing</strong> &#8211; <strong><span class="has-inline-color has-primary-color">755</span></strong>.<br><strong>storage/framework/sessions</strong> &#8211; <strong><span class="has-inline-color has-primary-color">777</span></strong>.<br><strong>storage/framework/cache</strong> &#8211; <strong><span class="has-inline-color has-primary-color">755</span></strong>.<br></li><li><strong>storage/logs</strong> &#8211; <strong><span class="has-inline-color has-primary-color">755</span></strong>.</li></ol>



<p class="wp-block-paragraph">That&#8217;s all. Hope this article will solved your problem.</p>



<p class="wp-block-paragraph">Keep Exploring.</p>



<p class="wp-block-paragraph">Thanks for reading.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Deploy a Laravel project to ubuntu server using git</title>
		<link>https://www.bestdevops.com/deploy-a-laravel-project-to-ubuntu-server-using-git/</link>
		
		<dc:creator><![CDATA[pradeep]]></dc:creator>
		<pubDate>Fri, 06 Aug 2021 12:53:48 +0000</pubDate>
				<category><![CDATA[Laravel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[gitbash]]></category>
		<category><![CDATA[GitHub]]></category>
		<category><![CDATA[laravel]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[xampp]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=18823</guid>

					<description><![CDATA[Steps to create project in local machine Step :1 Create a folder anywhere in your local computer with any name [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">Steps to create project in local machine</h2>



<h3 class="wp-block-heading">Step :1 Create a folder anywhere in your local computer with any name (Mine is workspace)</h3>



<p class="wp-block-paragraph"></p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="127" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-49-1024x127.png" alt="" class="wp-image-18824" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-49-1024x127.png 1024w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-49-300x37.png 300w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-49-768x96.png 768w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-49.png 1141w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption>You can go for any name you want</figcaption></figure>



<h3 class="wp-block-heading">Step:2 Make sure git and gitbash is installed in your local machine if not download it from <a href="https://git-scm.com/downloads" target="_blank" rel="noreferrer noopener">here</a></h3>



<h3 class="wp-block-heading">Step:3 Login into your GitHub account and create a repository</h3>



<p class="wp-block-paragraph"></p>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-50.png" alt="" class="wp-image-18825" width="623" height="649" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-50.png 698w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-50-288x300.png 288w" sizes="auto, (max-width: 623px) 100vw, 623px" /></figure>



<h3 class="wp-block-heading">Step 4: Clone the repository into your local machine </h3>



<ul class="wp-block-list"><li>get inside your repository </li></ul>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="912" height="354" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-51.png" alt="" class="wp-image-18826" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-51.png 912w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-51-300x116.png 300w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-51-768x298.png 768w" sizes="auto, (max-width: 912px) 100vw, 912px" /></figure>



<ul class="wp-block-list"><li>Copy the URL under HTTPS area </li><li>There are many more ways to clone a repo but for time being use this method </li><li>Now get inside our workspace folder that we created before (local/workspace)</li><li>right click and open git bash or command line inside the folder </li></ul>



<p class="wp-block-paragraph"></p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="843" height="390" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-52.png" alt="" class="wp-image-18827" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-52.png 843w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-52-300x139.png 300w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-52-768x355.png 768w" sizes="auto, (max-width: 843px) 100vw, 843px" /></figure>



<ul class="wp-block-list"><li>Run these git commands to get started </li></ul>


<pre class="wp-block-code"><span><code class="hljs">git init </code></span></pre>


<pre class="wp-block-preformatted">This is to&nbsp;initialize a new, empty repository </pre>


<pre class="wp-block-code"><span><code class="hljs language-php">git <span class="hljs-keyword">clone</span> https:<span class="hljs-comment">//github.com/pradeeprjth/laravelTestingProject.git &#91;HTTPS_URL_YOU_COPYED_FROM_GITHUB] </span></code></span></pre>


<pre class="wp-block-preformatted">This will clone everything stored in your remote repository into your local folder/repository
You will find a folder with the same name you created your repository </pre>



<h3 class="wp-block-heading">Step :5 paste your project/code inside the folder you just clone from the repository </h3>



<p class="wp-block-paragraph"></p>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-53.png" alt="" class="wp-image-18828" width="691" height="563" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-53.png 691w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-53-300x244.png 300w" sizes="auto, (max-width: 691px) 100vw, 691px" /></figure>



<ul class="wp-block-list"><li>Again run the below commands to push all the changes and codes back to the repository </li><li>Right click and open your git bash or cmd inside the folder </li></ul>


<pre class="wp-block-code"><span><code class="hljs">git add .</code></span></pre>


<pre class="wp-block-preformatted">The git add command&nbsp;<strong>adds a file to the Git staging area</strong>. This area contains a list of all the files you have recently changed.</pre>


<pre class="wp-block-code"><span><code class="hljs language-javascript">git commit -m<span class="hljs-string">"first_commit"</span></code></span></pre>


<pre class="wp-block-preformatted"><em>git commit</em>&nbsp;creates a commit, which is like a snapshot of your repository. These commits are snapshots of your entire repository at specific times. and you need to specify a commit message using -m flag including double quote</pre>


<pre class="wp-block-code"><span><code class="hljs">git push origin master    or    git push origin main </code></span></pre>


<pre class="wp-block-preformatted">git push -u origin master is&nbsp;<strong>used for pushing local content to GitHub</strong></pre>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-54.png" alt="" class="wp-image-18829" width="725" height="460" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-54.png 935w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-54-300x191.png 300w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-54-768x488.png 768w" sizes="auto, (max-width: 725px) 100vw, 725px" /><figcaption>Sorry for the CLI style I like it in this way </figcaption></figure>



<p class="wp-block-paragraph"></p>



<h3 class="wp-block-heading">Step 6: Login to your remote machine or ubuntu machine and make sure xampp and composer is installed in that machine.</h3>



<p class="wp-block-paragraph">Follow this blog if xampp and composer are not installed in your remote/ubuntu machine </p>



<h3 class="wp-block-heading">1. Installed Xampp</h3>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p><a href="https://www.devopsschool.com/blog/installing-xampp-7-4-xxx-on-ubuntu/">How to install and Configure XAMPP on Ubuntu?</a></p><cite>This blog is written by Rajesh thanks to him.</cite></blockquote>



<h3 class="wp-block-heading">2. Another thing which is required is Composer</h3>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p><a href="https://www.bestdevops.com/install-composer-using-cli-in-ubuntu-globally/">Install composer using CLI in ubuntu (Globally)</a></p><cite>Follow this to install composer in your machine using CLI</cite></blockquote>



<h3 class="wp-block-heading">Stpe :7 Go to your htdocs folder or if you have lampp then www  folder and run below commands</h3>


<pre class="wp-block-code"><span><code class="hljs">git init </code></span></pre>


<pre class="wp-block-preformatted"> This is to&nbsp;initialize a new, empty repository but this time inside your remote machine </pre>


<pre class="wp-block-code"><span><code class="hljs language-php">git <span class="hljs-keyword">clone</span> https:<span class="hljs-comment">//github.com/pradeeprjth/laravelTestingProject.git &#91;HTTPS_URL_YOU_COPYED_FROM_GITHUB]</span></code></span></pre>


<pre class="wp-block-preformatted">Now as we already have pushed all our code into our repository so we'll get all the files folder into our htdocs folder or www folder </pre>



<h3 class="wp-block-heading">Step 8: Now to run the project we need to do some configuration </h3>



<ul class="wp-block-list"><li>Copy the .env.example file to .env coz git ignore some files and folder including our vendor folder which contains all our Laravel project files . To do this run the below command.</li></ul>


<pre class="wp-block-code"><span><code class="hljs language-css"><span class="hljs-selector-tag">cp</span> <span class="hljs-selector-class">.env</span><span class="hljs-selector-class">.example</span> <span class="hljs-selector-class">.env</span></code></span></pre>


<ul class="wp-block-list"><li>Install composer, as git ignores our vendor folder in order to get it back we need to run </li></ul>


<pre class="wp-block-code"><span><code class="hljs">composer install</code></span></pre>


<ul class="wp-block-list"><li>You may get an error while composer install </li><li><em>Class &#8216;Illuminate\Support\facades\Schema not found </em></li><li>In order to solve this go to your project folder in local and inside C:\xampp\htdocs\WrokSpace\laravelTestproject\app\Providers\AppServiceProvider.php</li><li>use this class in the top <br>use Illuminate\Support\Facades\Schema;</li></ul>



<ul class="wp-block-list"><li>Next thing is to set the APP_KEY value in your .env file, run the command below </li></ul>


<pre class="wp-block-code"><span><code class="hljs language-css"><span class="hljs-selector-tag">php</span> <span class="hljs-selector-tag">artisan</span> <span class="hljs-selector-tag">key</span><span class="hljs-selector-pseudo">:generate</span></code></span></pre>


<h3 class="wp-block-heading">Step 9: Now go to your browser and put your ip followed by the project name /public to visit the application</h3>



<h3 class="wp-block-heading">  </h3>


<pre class="wp-block-code"><span><code class="hljs language-javascript">http:<span class="hljs-comment">//90.437.1965.252/laravelTestproject/public/</span></code></span></pre>


<p class="wp-block-paragraph">That&#8217;s it hope it help&#8217;s someone out there.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Laravel : Regex Validation For Password</title>
		<link>https://www.bestdevops.com/laravel-regex-validation-for-password/</link>
		
		<dc:creator><![CDATA[Sushant Kumar]]></dc:creator>
		<pubDate>Fri, 06 Aug 2021 11:10:50 +0000</pubDate>
				<category><![CDATA[Laravel]]></category>
		<category><![CDATA[laravel]]></category>
		<category><![CDATA[Regex Validation]]></category>
		<category><![CDATA[Validation For Password]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=18810</guid>

					<description><![CDATA[Minimum eight characters, at least one letter and one number: Minimum eight characters, at least one letter, one number and [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading"><strong>Minimum eight characters, at least one letter and one number:</strong></h3>


<pre class="wp-block-code"><span><code class="hljs language-json"><span class="hljs-string">"^(?=.*&#91;A-Za-z])(?=.*\d)&#91;A-Za-z\d]{8,}$"</span></code></span></pre>


<h3 class="wp-block-heading"><strong>Minimum eight characters, at least one letter, one number and one special character:</strong></h3>


<pre class="wp-block-code"><span><code class="hljs language-json"><span class="hljs-string">"^(?=.*&#91;A-Za-z])(?=.*\d)(?=.*&#91;@$!%*#?&amp;])&#91;A-Za-z\d@$!%*#?&amp;]{8,}$"</span></code></span></pre>


<p class="wp-block-paragraph"></p>



<h3 class="wp-block-heading"><strong>Minimum eight characters, at least one uppercase letter, one lowercase letter and one number:</strong></h3>


<pre class="wp-block-code"><span><code class="hljs language-json"><span class="hljs-string">"^(?=.*&#91;a-z])(?=.*&#91;A-Z])(?=.*\d)&#91;a-zA-Z\d]{8,}$"</span></code></span></pre>


<p class="wp-block-paragraph"></p>



<h3 class="wp-block-heading"><strong>Minimum eight characters, at least one uppercase letter, one lowercase letter, one number and one special character:</strong></h3>


<pre class="wp-block-code"><span><code class="hljs language-json"><span class="hljs-string">"^(?=.*&#91;a-z])(?=.*&#91;A-Z])(?=.*\d)(?=.*&#91;@$!%*?&amp;])&#91;A-Za-z\d@$!%*?&amp;]{8,}$"</span></code></span></pre>


<p class="wp-block-paragraph"></p>



<h3 class="wp-block-heading"><strong>Minimum eight and maximum 10 characters, at least one uppercase letter, one lowercase letter, one number and one special character:</strong></h3>


<pre class="wp-block-code"><span><code class="hljs language-json"><span class="hljs-string">"^(?=.*&#91;a-z])(?=.*&#91;A-Z])(?=.*\d)(?=.*&#91;@$!%*?&amp;])&#91;A-Za-z\d@$!%*?&amp;]{8,10}$"</span></code></span></pre>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Permissions required to make a Laravel project up and running in ubuntu (Linux)</title>
		<link>https://www.bestdevops.com/permissions-required-to-make-a-laravel-project-up-and-running-in-ubuntu-linux/</link>
		
		<dc:creator><![CDATA[pradeep]]></dc:creator>
		<pubDate>Fri, 06 Aug 2021 11:04:26 +0000</pubDate>
				<category><![CDATA[Laravel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[laravel]]></category>
		<category><![CDATA[permission]]></category>
		<category><![CDATA[permission_denied]]></category>
		<category><![CDATA[session]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=18807</guid>

					<description><![CDATA[Before moving further, hope you have already installed xampp and composer in your machine.if not follow the below blog to [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">Before moving further, hope you have already installed xampp and composer in your machine.<br>if not follow the below blog to do so.</h2>



<figure class="wp-block-embed is-type-wp-embed is-provider-devops-devsecops-sre-dataops-aiops wp-block-embed-devops-devsecops-sre-dataops-aiops"><div class="wp-block-embed__wrapper">
<blockquote class="wp-embedded-content" data-secret="ipO4OKcLIx"><a href="https://www.bestdevops.com/install-a-laravel-project-inside-htdocs-folder-in-ubuntu/">Install a Laravel project inside htdocs folder in ubuntu</a></blockquote><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  title="&#8220;Install a Laravel project inside htdocs folder in ubuntu&#8221; &#8212; Best DevOps" src="https://www.bestdevops.com/install-a-laravel-project-inside-htdocs-folder-in-ubuntu/embed/#?secret=J1P7D2j1fx#?secret=ipO4OKcLIx" data-secret="ipO4OKcLIx" width="600" height="338" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
</div></figure>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="636" height="186" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-48.png" alt="" class="wp-image-18808" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-48.png 636w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-48-300x88.png 300w" sizes="auto, (max-width: 636px) 100vw, 636px" /></figure>



<h1 class="wp-block-heading">First permission:</h1>



<p class="wp-block-paragraph">As you know the first thing our browser needs to run a Laravel project is, the index file which is located in the public folder <br>so we need to make it read and writable so that our browser can access it and if required can modify it.</p>



<p class="wp-block-paragraph">Run the below command to grant access to the public folder </p>


<pre class="wp-block-code"><span><code class="hljs language-php">cd /opt/lampp/htdocs/YOUR_PROJECT
sudo chmod -R +rw <span class="hljs-keyword">public</span></code></span></pre>


<h1 class="wp-block-heading">Second permission:</h1>



<p class="wp-block-paragraph">The next permission if for the storage folder, as you already know when our Laravel projects runs it create some logs files automatically if any error found in you code base, </p>



<p class="wp-block-paragraph">Run the below command to grant access to the logs folder </p>


<pre class="wp-block-code"><span><code class="hljs">cd /opt/lampp/htdocs/YOUR_PROJECT
sudo chmod -R +rw storage</code></span></pre>


<h1 class="wp-block-heading">Third permission:</h1>



<p class="wp-block-paragraph">At the end, the final permission we have to give to our session folder which is located inside our <strong>storage/framework</strong> folder,<br>and every time we hit our project URL a new random session key is generated, that get stored in our session folder <br>so all of them are necessary to run a Laravel project </p>



<p class="wp-block-paragraph">Run the below command to grand access to the <strong>framework </strong>and session </p>


<pre class="wp-block-code"><span><code class="hljs">sudo chmod -R 775 framework
sudo chmod -R 775 session</code></span></pre>


<p class="wp-block-paragraph">That&#8217;s it, these all works for me hope it for you too </p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Install a Laravel project inside htdocs folder in ubuntu</title>
		<link>https://www.bestdevops.com/install-a-laravel-project-inside-htdocs-folder-in-ubuntu/</link>
		
		<dc:creator><![CDATA[pradeep]]></dc:creator>
		<pubDate>Fri, 06 Aug 2021 09:49:10 +0000</pubDate>
				<category><![CDATA[Laravel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[composer]]></category>
		<category><![CDATA[laravel]]></category>
		<category><![CDATA[mbstring]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[xampp]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=18793</guid>

					<description><![CDATA[I was moving a Laravel project to a ubuntu virtual machine.Steps that I followed: 1. Installed Xampp 2. Another thing [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading">I was moving a Laravel project to a  ubuntu  virtual machine.<br>Steps that I followed:</h3>



<h3 class="wp-block-heading">1.  Installed Xampp </h3>



<figure class="wp-block-embed is-type-wp-embed is-provider-devopsschool-com wp-block-embed-devopsschool-com"><div class="wp-block-embed__wrapper">
<blockquote class="wp-embedded-content" data-secret="lwILFIsreb"><a href="https://www.devopsschool.com/blog/installing-xampp-7-4-xxx-on-ubuntu/">How to install  and Configure XAMPP  on Ubuntu?</a></blockquote><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  title="&#8220;How to install  and Configure XAMPP  on Ubuntu?&#8221; &#8212; DevOpsSchool.com" src="https://www.devopsschool.com/blog/installing-xampp-7-4-xxx-on-ubuntu/embed/#?secret=AiPeZ0yBbG#?secret=lwILFIsreb" data-secret="lwILFIsreb" width="600" height="338" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
</div><figcaption>By following this blog i was successfully xampp running on my machine. Thanks to the auther Rajesh Kumar</figcaption></figure>



<h3 class="wp-block-heading">2. Another thing which is required is Composer </h3>



<figure class="wp-block-embed is-type-wp-embed is-provider-devops-devsecops-sre-dataops-aiops wp-block-embed-devops-devsecops-sre-dataops-aiops"><div class="wp-block-embed__wrapper">
<blockquote class="wp-embedded-content" data-secret="ep8po4mbU8"><a href="https://www.bestdevops.com/install-composer-using-cli-in-ubuntu-globally/">Install composer using CLI in ubuntu (Globally)</a></blockquote><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  title="&#8220;Install composer using CLI in ubuntu (Globally)&#8221; &#8212; Best DevOps" src="https://www.bestdevops.com/install-composer-using-cli-in-ubuntu-globally/embed/#?secret=EhSiZXmf7j#?secret=ep8po4mbU8" data-secret="ep8po4mbU8" width="600" height="338" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
</div></figure>



<h3 class="wp-block-heading">3. Now the thing is when we try to install Laravel project inside our htdocs folder it through an error</h3>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="884" height="260" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-42.png" alt="" class="wp-image-18795" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-42.png 884w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-42-300x88.png 300w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-42-768x226.png 768w" sizes="auto, (max-width: 884px) 100vw, 884px" /></figure>



<p class="wp-block-paragraph"></p>



<h3 class="wp-block-heading">4. To resolve this error first create a folder inside your htdocs.</h3>


<pre class="wp-block-code"><span><code class="hljs">mkdir Projects</code></span></pre>


<h3 class="wp-block-heading">5 grant read and write permissions to this folder by running this commands</h3>


<pre class="wp-block-code"><span><code class="hljs">sude chmod +rw Projects</code></span></pre>


<h3 class="wp-block-heading">6. You may get another error while installing is (&#8220;mbstring&#8221; extension is missing.)</h3>



<p class="wp-block-paragraph">Run the below commands to resolve these errors</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">sudo apt-<span class="hljs-keyword">get</span> install php-mbstring
</code></span></pre>

<pre class="wp-block-code"><span><code class="hljs">sudo su - root
</code></span></pre>


<h3 class="wp-block-heading">7. That&#8217;s it now try installing your project again </h3>


<pre class="wp-block-code"><span><code class="hljs language-javascript">composer create-project --prefer-dist laravel/laravel testProject <span class="hljs-string">"5.8.*"</span></code></span></pre>


<p class="wp-block-paragraph">That&#8217;s it, Hope it help someone out there.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Install composer using CLI in ubuntu (Globally)</title>
		<link>https://www.bestdevops.com/install-composer-using-cli-in-ubuntu-globally/</link>
		
		<dc:creator><![CDATA[pradeep]]></dc:creator>
		<pubDate>Fri, 06 Aug 2021 06:56:12 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[composer]]></category>
		<category><![CDATA[installComposer]]></category>
		<category><![CDATA[installPHPComposer]]></category>
		<category><![CDATA[laravel]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=18726</guid>

					<description><![CDATA[Steps For Installing PHP Composer on Ubuntu STEP 1: Update You distribution Enter this command to update the local repository [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h1 class="wp-block-heading">Steps For Installing PHP Composer on Ubuntu</h1>



<h2 class="wp-block-heading">STEP 1: Update You distribution </h2>



<p class="wp-block-paragraph">Enter this command to update the local repository lists.</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">sudo apt-<span class="hljs-keyword">get</span> update</code></span></pre>


<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-34.png" alt="" class="wp-image-18727" width="466" height="565" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-34.png 560w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-34-247x300.png 247w" sizes="auto, (max-width: 466px) 100vw, 466px" /><figcaption>Maker sure you get this reading package lists&#8230;. Done Message at the end!</figcaption></figure>



<h2 class="wp-block-heading">STEP 2: Download the Composer Installer</h2>



<p class="wp-block-paragraph">run the below command in your root directory (We are installing composer globally)</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">php -r <span class="hljs-string">"copy('https://getcomposer.org/installer', 'composer-setup.php');"</span></code></span></pre>


<h2 class="wp-block-heading">Step 3: Verify Integrity of the Download</h2>



<p class="wp-block-paragraph">1. Visit the <a href="https://composer.github.io/pubkeys.html" target="_blank" rel="noreferrer noopener">Composer Public Keys</a> page. Copy the Installer Signature (SHA-384).<br>2. Set the code shell variable:</p>



<p class="wp-block-paragraph"><strong>COMPOSER=48e3236262b34d30969dca3c37281b3b4bbe3221bda826ac6a9a62d6444cdb0dcd0615698a5cbe587c3f0fe57a54d8f5</strong><br>3. Run the script below to compare the official hash against the one you downloaded:</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">php -r <span class="hljs-string">"if (hash_file('SHA384', 'composer-setup.php') === '$COMPOSER') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"</span></code></span></pre>


<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="177" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-36-1024x177.png" alt="" class="wp-image-18730" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-36-1024x177.png 1024w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-36-300x52.png 300w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-36-768x133.png 768w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-36.png 1315w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<figure class="wp-block-image size-large is-resized"><img loading="lazy" decoding="async" src="https://www.bestdevops.com/wp-content/uploads/2021/08/composer-install-1-1024x433.png" alt="" class="wp-image-18728" width="914" height="386" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/composer-install-1-1024x433.png 1024w, https://www.bestdevops.com/wp-content/uploads/2021/08/composer-install-1-300x127.png 300w, https://www.bestdevops.com/wp-content/uploads/2021/08/composer-install-1-768x325.png 768w, https://www.bestdevops.com/wp-content/uploads/2021/08/composer-install-1.png 1328w" sizes="auto, (max-width: 914px) 100vw, 914px" /></figure>



<h2 class="wp-block-heading">Step 4: Install PHP Composer</h2>



<p class="wp-block-paragraph">1. Installing PHP Composer requires curl, unzip, and a few other utilities. Install them by entering the following:</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">sudo apt-<span class="hljs-keyword">get</span> install curl php-cli php-mbstring git unzip</code></span></pre>


<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="559" height="279" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-37.png" alt="" class="wp-image-18733" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-37.png 559w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-37-300x150.png 300w" sizes="auto, (max-width: 559px) 100vw, 559px" /><figcaption>The process may take a while to complete for additional Downloads and make sure to permit the installation process </figcaption></figure>



<h3 class="wp-block-heading">2. To install to&nbsp;<strong>/usr/local/bin</strong>. enter:</h3>


<pre class="wp-block-code"><span><code class="hljs language-javascript">sudo php composer-setup.php --install-dir=<span class="hljs-regexp">/usr/</span>local/bin --filename=composer</code></span></pre>


<p class="wp-block-paragraph">The installer should output:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="822" height="113" src="https://www.bestdevops.com/wp-content/uploads/2021/08/composerfinal.png" alt="" class="wp-image-18737" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/composerfinal.png 822w, https://www.bestdevops.com/wp-content/uploads/2021/08/composerfinal-300x41.png 300w, https://www.bestdevops.com/wp-content/uploads/2021/08/composerfinal-768x106.png 768w" sizes="auto, (max-width: 822px) 100vw, 822px" /><figcaption>Check the composer version by running command composer &#8211;version or composer -v</figcaption></figure>



<p class="wp-block-paragraph">That&#8217;s it hope it helps someone there.</p>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
