<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Asif Sheikh</title>
    <description>The latest articles on DEV Community by Asif Sheikh (@asif_sheikh_d7d74ce8b9c9d).</description>
    <link>https://dev.to/asif_sheikh_d7d74ce8b9c9d</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1507137%2Ffbff1106-537a-4495-98b1-4ddb12b9500b.png</url>
      <title>DEV Community: Asif Sheikh</title>
      <link>https://dev.to/asif_sheikh_d7d74ce8b9c9d</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/asif_sheikh_d7d74ce8b9c9d"/>
    <language>en</language>
    <item>
      <title>Customizing Action Buttons in Laravel Orchid CRUD: Removing Labels and Adding a Delete Button</title>
      <dc:creator>Asif Sheikh</dc:creator>
      <pubDate>Sat, 07 Dec 2024 19:31:35 +0000</pubDate>
      <link>https://dev.to/asif_sheikh_d7d74ce8b9c9d/customizing-action-buttons-in-laravel-orchid-crud-removing-labels-and-adding-a-delete-button-1f6d</link>
      <guid>https://dev.to/asif_sheikh_d7d74ce8b9c9d/customizing-action-buttons-in-laravel-orchid-crud-removing-labels-and-adding-a-delete-button-1f6d</guid>
      <description>&lt;p&gt;Hello everyone,&lt;/p&gt;

&lt;p&gt;I’m currently working on a project using the Laravel Orchid CRUD package. Specifically, I’m trying to customize the action buttons for an Inquiry Resource in the CRUD implementation.&lt;/p&gt;

&lt;p&gt;What I’m Trying to Achieve&lt;br&gt;
Remove the labels from the action buttons (e.g., Edit, Delete, etc.) to make them appear as icons only.&lt;br&gt;
Add a Delete button to the action buttons, as it’s currently missing in the default configuration.&lt;br&gt;
What I Have Tried&lt;br&gt;
I’ve been exploring the Orchid documentation and related resources to find a solution for customizing the actions, but I haven’t been able to find a clear way to achieve these goals. My resource class follows the standard structure as outlined in the Orchid CRUD documentation.&lt;/p&gt;

&lt;p&gt;Here is the relevant portion of my Inquiry Resource code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;namespace App\Orchid\Resources;

use App\Models\Inquiry;
use Orchid\Crud\Resource;
use Orchid\Screen\Actions\Button;
use Orchid\Screen\Fields\Input;
use Orchid\Screen\TD;

class InquiryResource extends Resource
{
    public static $model = Inquiry::class;

    public function fields(): array
    {
        return [
            Input::make('name')-&amp;gt;title('Name')-&amp;gt;required(),
            Input::make('email')-&amp;gt;title('Email')-&amp;gt;required(),
        ];
    }

    public function columns(): array
    {
        return [
            TD::make('name', 'Name'),
            TD::make('email', 'Email'),
        ];
    }

    public function actions(): array
    {
        return [
            Button::make('Edit')
                -&amp;gt;icon('pencil')
                -&amp;gt;method('edit'),
        ];
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Challenges&lt;/strong&gt;&lt;br&gt;
I cannot find a way to remove the labels from the action buttons while keeping the icons intact.&lt;br&gt;
I’m unsure how to properly define a Delete button for this resource.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Question&lt;/strong&gt;&lt;br&gt;
Could someone guide me on how to:&lt;/p&gt;

&lt;p&gt;Remove the labels from the action buttons and display only the icons?&lt;br&gt;
Add a Delete button to the action buttons?&lt;br&gt;
Any help or examples would be greatly appreciated! Thank you in advance.&lt;/p&gt;

&lt;p&gt;Best regards,&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Thanks for read this article.😊🥰&lt;br&gt;
If you have any queries related to this article, please🙏 drop query in this comment section. We will reply as soon as possible on your query.&lt;/strong&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Create Zip File Using PHP</title>
      <dc:creator>Asif Sheikh</dc:creator>
      <pubDate>Thu, 21 Nov 2024 17:25:17 +0000</pubDate>
      <link>https://dev.to/asif_sheikh_d7d74ce8b9c9d/create-zip-file-using-php-4b31</link>
      <guid>https://dev.to/asif_sheikh_d7d74ce8b9c9d/create-zip-file-using-php-4b31</guid>
      <description>&lt;p&gt;In web development, creating ZIP files dynamically is a common task. For example, you might need to compress multiple files or an entire folder to improve file management, optimize downloads, or serve as backup files. PHP provides an easy way to handle file compression using the ZipArchive class. This article will walk you through the steps to create ZIP files programmatically using PHP.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is ZipArchive in PHP?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The ZipArchive class is a built-in PHP class that allows you to create, read, and extract ZIP archives. It provides a simple interface for manipulating ZIP files directly from within your PHP scripts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Requirements&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;PHP 5.2.0 or later:&lt;/strong&gt; ZipArchive is available in PHP versions 5.2.0 and above.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PHP ZIP Extension:&lt;/strong&gt; Ensure the PHP ZIP extension is enabled on your server. If you're using a local development environment, it might need to be enabled manually in your php.ini file.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Step-by-Step Guide to Create a ZIP File&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Creating the ZIP File&lt;/strong&gt;&lt;br&gt;
To create a ZIP file, first instantiate the ZipArchive class and specify the name of the ZIP file you want to create.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?php
// Create a new instance of ZipArchive
$zip = new ZipArchive();

// Specify the name of the ZIP file
$zipFileName = 'my_archive.zip';

// Open the ZIP file for writing. If the file doesn't exist, it will be created
if ($zip-&amp;gt;open($zipFileName, ZipArchive::CREATE | ZipArchive::OVERWRITE) === TRUE) {
    echo 'ZIP file created successfully!';
} else {
    echo 'Failed to create the ZIP file.';
}
?&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2: Adding Files to the ZIP&lt;/strong&gt;&lt;br&gt;
After opening the ZIP file, you can add files to it using the addFile() method.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?php
if ($zip-&amp;gt;open($zipFileName, ZipArchive::CREATE | ZipArchive::OVERWRITE) === TRUE) {
    // Add files to the ZIP archive
    $zip-&amp;gt;addFile('file1.txt', 'file1.txt');  // Add file1.txt to the root of the archive
    $zip-&amp;gt;addFile('file2.jpg', 'file2.jpg');  // Add file2.jpg to the root of the archive

    // Close the ZIP file
    $zip-&amp;gt;close();
    echo 'Files added to ZIP file!';
} else {
    echo 'Failed to create the ZIP file.';
}
?&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;PHP's ZipArchive class offers an easy and flexible way to create and manage ZIP archives. Whether you're compressing files for download, backing up directories, or optimizing storage, this class provides a straightforward solution. By following the steps outlined in this guide, you can effectively create ZIP files from both individual files and entire directories with ease.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Thanks for read this article.😊🥰&lt;br&gt;
If you have any queries related to this article, please🙏 drop query in this comment section. We will reply as soon as possible on your query.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>php</category>
      <category>zipfile</category>
      <category>programming</category>
      <category>learning</category>
    </item>
    <item>
      <title>How can we enable multi-site in worpress website in local?</title>
      <dc:creator>Asif Sheikh</dc:creator>
      <pubDate>Thu, 15 Aug 2024 19:01:33 +0000</pubDate>
      <link>https://dev.to/asif_sheikh_d7d74ce8b9c9d/how-can-we-enable-multi-site-in-worpress-website-in-local-1a8</link>
      <guid>https://dev.to/asif_sheikh_d7d74ce8b9c9d/how-can-we-enable-multi-site-in-worpress-website-in-local-1a8</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffbfrc2qsw0chqh4ul9er.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffbfrc2qsw0chqh4ul9er.png" alt="Image description" width="800" height="432"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;WordPress Multisite is a powerful feature that allows you to manage multiple websites from a single WordPress installation. This is especially useful for developers, network admins, or anyone who needs to manage several sites from one dashboard. Setting up WordPress Multisite locally lets you experiment and develop in a controlled environment without impacting live sites. This article will guide you through the process of enabling WordPress Multisite on your local machine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Before starting, ensure you have the following prerequisites:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A local server environment like XAMPP, MAMP, or Local by Flywheel installed on your machine.&lt;/li&gt;
&lt;li&gt;A fresh or existing WordPress installation running on your local server.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Enable Multisite in the wp-config.php File&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Locate the wp-config.php File: This file is in the root directory of your WordPress installation. Use a text editor to open it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add the Multisite Constant: Insert the following line of code above the line that says /* That's all, stop editing! Happy publishing. */:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    define('WP_ALLOW_MULTISITE', true);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2: Configure the Network&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Access the WordPress Dashboard: Log in to your local WordPress site as an administrator.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enable the Network Setup:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Go to Tools &amp;gt; Network Setup in the WordPress admin menu.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Choose between Sub-domains or Sub-directories based on your needs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sub-domains: Sites will be created as subdomains (e.g., site1.localhost).&lt;/li&gt;
&lt;li&gt;Sub-directories: Sites will be created as subdirectories (e.g., localhost/site1).&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Provide a title for your network and an email address for the network administrator.&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Install the Network: Click the Install button. WordPress will now provide some additional code snippets to add to your wp-config.php and .htaccess files.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Update Configuration Files&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update wp-config.php:&lt;/strong&gt; Add the following lines to your wp-config.php file below the line you previously added:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false); // Set to true if using subdomains
    define('DOMAIN_CURRENT_SITE', 'localhost');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Modify the .htaccess File&lt;/strong&gt;: Locate the .htaccess file in your WordPress root directory. If it doesn’t exist, create one. Replace any existing WordPress rules with the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]

    # Add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . /index.php [L]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Save the Changes:&lt;/strong&gt; Ensure both files are saved and closed after editing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4: Access the Network Admin Dashboard&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Log Back into WordPress:&lt;/strong&gt; After saving your changes, log back into your WordPress dashboard. You may need to clear your browser cache or cookies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Network Administration:&lt;/strong&gt; You will now notice a new My Sites menu in the WordPress toolbar. This menu lets you manage your network of sites, including creating new sites, managing users, and installing themes and plugins network-wide.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5: Create and Manage Sites&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Add New Sites:&lt;/strong&gt;&lt;br&gt;
        - Go to My Sites &amp;gt; Network Admin &amp;gt; Sites.&lt;br&gt;
        - Click Add New to create a new site within your network.&lt;br&gt;
        - Fill in the site address, title, and administrator email, then click Add Site.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Manage Sites:&lt;/strong&gt;&lt;br&gt;
       - Each site in your network can have its own themes, plugins, and settings.&lt;br&gt;
       - From the Network Admin dashboard, you can manage all sites in the network, including deleting sites, managing users, and configuring settings.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Enabling WordPress Multisite on a local environment is a valuable tool for developers and site administrators who manage multiple sites. It provides a centralized way to manage, update, and maintain several sites without the need for separate installations. By following these steps, you can set up a local WordPress Multisite network efficiently and start developing or testing your websites with ease.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Thanks for read this article.😊🥰&lt;br&gt;
If you have any queries related to this article, please🙏 drop query in this comment section. We will reply as soon as possible on your query.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>website</category>
      <category>php</category>
      <category>multisite</category>
    </item>
    <item>
      <title>Slim Php Framework: How to create Route Wrapper Class in Slim?</title>
      <dc:creator>Asif Sheikh</dc:creator>
      <pubDate>Sun, 26 May 2024 13:20:29 +0000</pubDate>
      <link>https://dev.to/asif_sheikh_d7d74ce8b9c9d/slim-php-framework-how-to-create-route-wrapper-class-in-slim-4doh</link>
      <guid>https://dev.to/asif_sheikh_d7d74ce8b9c9d/slim-php-framework-how-to-create-route-wrapper-class-in-slim-4doh</guid>
      <description>&lt;p&gt;Hello everyone!✌&lt;/p&gt;

&lt;p&gt;Now we are going to discuss about creating Route Wrapper Class in Slim Php Framework.&lt;/p&gt;

&lt;p&gt;We have to follow few steps to creating route class and I hope you to enjoy it. It makes life easier for slim developer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STEP 1: Creating Route Wrapper Class&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Creating a new php file in App\Core\Route.php in your slim project directory. I have named Route.php.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?php

namespace App;

use Slim\App;

class Router
{
    protected $app;

    public function __construct(App $app)
    {
        $this-&amp;gt;app = $app;
    }

    public function get($pattern, $callable)
    {
        $this-&amp;gt;app-&amp;gt;get($pattern, $callable);
    }

    public function post($pattern, $callable)
    {
        $this-&amp;gt;app-&amp;gt;post($pattern, $callable);
    }

    public function put($pattern, $callable)
    {
        $this-&amp;gt;app-&amp;gt;put($pattern, $callable);
    }

    public function delete($pattern, $callable)
    {
        $this-&amp;gt;app-&amp;gt;delete($pattern, $callable);
    }

    public function patch($pattern, $callable)
    {
        $this-&amp;gt;app-&amp;gt;patch($pattern, $callable);
    }

    public function group($pattern, $callable)
    {
        $this-&amp;gt;app-&amp;gt;group($pattern, $callable);
    }

    public function middleware($middleware)
    {
        $this-&amp;gt;app-&amp;gt;add($middleware);
    }

    public function controller($pattern, $controller)
    {
        $this-&amp;gt;app-&amp;gt;any($pattern . '[/{action}]', function ($request, $response, $args) use ($controller) {
            $action = $args['action'] ?? 'index';
            $controllerInstance = new $controller();
            return $controllerInstance-&amp;gt;$action($request, $response, $args);
        });
    }

    public function resource($pattern, $controller)
    {
        $this-&amp;gt;app-&amp;gt;get($pattern, $controller . ':index');
        $this-&amp;gt;app-&amp;gt;get($pattern . '/create', $controller . ':create');
        $this-&amp;gt;app-&amp;gt;post($pattern, $controller . ':store');
        $this-&amp;gt;app-&amp;gt;get($pattern . '/{id}', $controller . ':show');
        $this-&amp;gt;app-&amp;gt;get($pattern . '/{id}/edit', $controller . ':edit');
        $this-&amp;gt;app-&amp;gt;put($pattern . '/{id}', $controller . ':update');
        $this-&amp;gt;app-&amp;gt;delete($pattern . '/{id}', $controller . ':destroy');
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;STEP 2: Use Above Route Class in index.php&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?php

use Slim\Factory\AppFactory;
use App\Router;

require __DIR__ . '/vendor/autoload.php';

$app = AppFactory::create();

$router = new Router($app);

// Define your routes
$router-&amp;gt;get('/home', function ($request, $response, $args) {
    $response-&amp;gt;getBody()-&amp;gt;write('Hello, Home!');
    return $response;
});

$router-&amp;gt;post('/submit', function ($request, $response, $args) {
    // handle post request
    return $response;
});

// Grouped routes
$router-&amp;gt;group('/api', function () use ($router) {
    $router-&amp;gt;get('/users', function ($request, $response, $args) {
        $response-&amp;gt;getBody()-&amp;gt;write('List of users');
        return $response;
    });

    $router-&amp;gt;post('/users', function ($request, $response, $args) {
        // handle post request
        return $response;
    });
});

// Controller route
$router-&amp;gt;controller('/product', \App\Controllers\ProductController::class);

// Resource route
$router-&amp;gt;resource('/articles', \App\Controllers\ArticleController::class);

$app-&amp;gt;run();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Thanks for giving your time and considerations!✨&lt;/p&gt;

</description>
      <category>php</category>
      <category>framework</category>
      <category>webdevelopement</category>
      <category>slim</category>
    </item>
    <item>
      <title>Creating route directory in Slim Php Framework</title>
      <dc:creator>Asif Sheikh</dc:creator>
      <pubDate>Thu, 23 May 2024 18:38:17 +0000</pubDate>
      <link>https://dev.to/asif_sheikh_d7d74ce8b9c9d/creating-route-directory-in-slim-php-framework-46eb</link>
      <guid>https://dev.to/asif_sheikh_d7d74ce8b9c9d/creating-route-directory-in-slim-php-framework-46eb</guid>
      <description>&lt;p&gt;Hello Everyone,&lt;/p&gt;

&lt;p&gt;I have discussed on creating route directory in slim php framework. It makes easy to organize or modular your slim project.&lt;/p&gt;

&lt;p&gt;Let's go,&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STEP 1:&lt;/strong&gt;&lt;br&gt;
Firstly, copy your code in &lt;code&gt;public/index.php&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$routes = glob(__DIR__ . "/../routes/*.php");

foreach($routes as $route)
{
     (require $route)($app);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;STEP 2:&lt;/strong&gt;&lt;br&gt;
In second step, we'll create routes directory in our slim project directory and also create &lt;code&gt;routes/web.php&lt;/code&gt; file:&lt;br&gt;
Like this,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?php

use Slim\App;

return function (App $app)
{
     $app-&amp;gt;get("/your-route", function ($request, $response, $args){
           $response-&amp;gt;getBody()-&amp;gt;write("Hello, I am in your route");
           return $respones;
     });
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I hope you to enjoy for creating such routes separate files that may be slim code organizable, readable.&lt;/p&gt;

&lt;p&gt;Thank you for giving your valuable time to read this!✨&lt;/p&gt;

</description>
      <category>login</category>
      <category>php</category>
      <category>slim</category>
      <category>framework</category>
    </item>
  </channel>
</rss>
