<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Go Sha on Medium]]></title>
        <description><![CDATA[Stories by Go Sha on Medium]]></description>
        <link>https://medium.com/@gopalindians?source=rss-f82f6e55ef8d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*GOoytqXjMBTkHdHiMlTB9A.jpeg</url>
            <title>Stories by Go Sha on Medium</title>
            <link>https://medium.com/@gopalindians?source=rss-f82f6e55ef8d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 10:00:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gopalindians/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Installing/Using telescope in production env in Laravel 10.]]></title>
            <link>https://gopalindians.medium.com/installing-using-telescope-in-production-env-in-laravel-10-241978c786a9?source=rss-f82f6e55ef8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/241978c786a9</guid>
            <category><![CDATA[mysql]]></category>
            <category><![CDATA[laravel-telescope]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[php]]></category>
            <dc:creator><![CDATA[Go Sha]]></dc:creator>
            <pubDate>Fri, 26 Jan 2024 10:38:10 GMT</pubDate>
            <atom:updated>2024-01-29T01:07:12.505Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NnGMZLAhIh_12lFe" /><figcaption>Photo by <a href="https://unsplash.com/@ja_b?utm_source=medium&amp;utm_medium=referral">Jaro Bielik</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>So you might have been trying your hands on telescope. Laravel’s official docs say it is a companion for local development.</p><p>But what about if you want to use it in <em>production</em>?</p><p>Without wasting much time let’s jump in to production setup.</p><p>So below are things which we are going to follow.</p><ol><li>Installing telescope as a normal package, i.e. not as a <em>dev</em>.</li><li>Running migration so that the telescope&#39;s three main tables are created, <strong><em>telescope_entries</em></strong>, <strong><em>telescope_entries</em></strong> and <strong><em>telescope_monitoring</em></strong></li><li>After the above two steps, we will make some changes so that the telescope is restricted to one or some users. i.e. Admin-only access.</li></ol><h4><strong>1. Installing telescope</strong></h4><p>Run the below two commands inside your existing Laravel project.</p><blockquote>composer require laravel/telescope</blockquote><blockquote>php artisan telescope:install</blockquote><h4><strong>2. Running migration</strong></h4><p>Run the below command to create the three main tables used by the telescope.</p><blockquote>php artisan migrate</blockquote><h4>3. Creating admin middleware</h4><p>Run the below command to create middleware, this will help us prevent the unauthorized access to <em>/telescope</em> route.</p><blockquote>php artisan make:middleware AdminMiddleware</blockquote><p>Add <em>AdminMiddleware</em> under <em>app/Http/Kernel.php</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QITvD00nry686ngwTwpQqw.png" /><figcaption>app/Http/Kernel.php</figcaption></figure><h4>4. Updating config/telescope.php</h4><p>Inside <strong>middleware</strong> add <em>auth.admin</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YXdhXbirmrhdmUpOBDJTyw.png" /><figcaption>config/telescope.php</figcaption></figure><p>This will make sure every time you access the /telescope it will check the auth.admin middleware.</p><h4>5. Update the AdminMiddleware to handle unauthorized access.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OaLVpZe8boI-OWTfashCqg.png" /><figcaption>app/Http/Middleware/AdminMiddleware.php</figcaption></figure><p>Under AdminMiddleware, you can check for any session/cookie data to make sure only certain users can access the <em>/telescope</em> URL, otherwise show 404 or redirect them to the <em>/login</em> page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*77-dwh_7rTeKNg3Qn04gVw.png" /><figcaption>/login or /admin/login page</figcaption></figure><blockquote>If you followed the steps correctly, you can access the /telescope endpoint.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8bzaOtP03x0XhnmP16KHng.png" /><figcaption>/telescope page</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=241978c786a9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to host Laravel 6 on godaddy shared server?]]></title>
            <link>https://gopalindians.medium.com/how-to-host-laravel-6-on-godaddy-shared-server-b36f443a6c5c?source=rss-f82f6e55ef8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/b36f443a6c5c</guid>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[laravel-10]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[godaddy]]></category>
            <category><![CDATA[hosting]]></category>
            <dc:creator><![CDATA[Go Sha]]></dc:creator>
            <pubDate>Sat, 07 Sep 2019 01:34:42 GMT</pubDate>
            <atom:updated>2023-09-10T18:42:14.463Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>How to host Laravel 6,7,8,9,10 on </strong>GoDaddy’s<strong> shared server with file upload?</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*f6gdmCxA_fODDuUQ" /><figcaption>Photo by <a href="https://unsplash.com/@neonbrand?utm_source=medium&amp;utm_medium=referral">NeONBRAND</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Before we can dive into this, I hope you have your app ready for the world to see, if not you can download and create a new Laravel app from here <a href="https://laravel.com/docs/6.0/installation">https://laravel.com/docs/6.0/installation</a>.</p><p>Also please make sure that you have valid GoDaddy hosting and a domain.</p><p>The next step would be to zip the app, I would name it with a timestamp like <strong><em>hero_app_2056102019.zip</em></strong><em>,</em> it would, later on, helps when you deploy the same app multiple times a day.</p><p>Open your cPanel’s file manager and upload the zip to the root directory. After uploading extract the zip. Uploading single zip is faster than uploading multiple files through FTP.</p><p>Now the main tricks.</p><p>Almost all shared server serves from the public_html directory.</p><h3>First trick:</h3><p>Laravel serves from the public folder so the trick is to copy all the files from the public folder of the <strong><em>hero_app_2056102019 </em></strong>to the public_html folder of the server. Why this? so that our app files are not publicly available.</p><h3>Tijme Gommers on Twitter</h3><p>Many Laravel applications expose their database, AWS &amp;amp; mail credentials due to misconfigurations 😅 (credits to someone on a private Slack channel). https://t.co/1u0NCjfIrg</p><p>The next step is to update the index.php present in the public_html folder(which now includes all the public folder files).</p><p>Update your index.php file in the public_html folder to look like this.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9d62e092d9c112e511f6e2e678560812/href">https://medium.com/media/9d62e092d9c112e511f6e2e678560812/href</a></iframe><h3>Second trick:</h3><p>Open <em>hero_app_2056102019</em><strong><em>/</em></strong><em>app/Providers/AppServiceProvider.php</em> and update the <em>boot()</em> function</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6cbe85335ff73016fbf85c564a9fa279/href">https://medium.com/media/6cbe85335ff73016fbf85c564a9fa279/href</a></iframe><h3>Third trick:</h3><p>The last and the final trick is to remove cache files present in <em>hero_app_2056102019/app/bootstrap/cache</em> folder</p><p>Delete all the files in the cache folder.</p><p>If you have followed the tricks carefully, you will see your app successfully deployed on GoDaddy’s shared hosting.</p><p><strong>Update 0</strong>: use <em>ln -s storage/app/public ../public_html/storage</em></p><p>inside the directory for handling symlink.</p><p><strong>Update 1</strong>: Symlinks can be tricky if you have moved your <em>public</em> directory to <em>public_html, </em>if the above vanilla symlinking not working for you, use the method shown below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7ee522938af7279d6a408e284664c398/href">https://medium.com/media/7ee522938af7279d6a408e284664c398/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f05452e52fddeb9a14badaa46e86ce32/href">https://medium.com/media/f05452e52fddeb9a14badaa46e86ce32/href</a></iframe><p>Now you can upload your files and access with the below code</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8d47eb029a4915ac5756874b1a0eee44/href">https://medium.com/media/8d47eb029a4915ac5756874b1a0eee44/href</a></iframe><p><strong>Update 3</strong>:If you see any error related to the PHP version</p><p><strong><em>Composer detected issues in your platform: Your Composer dependencies require a PHP version “&gt;= 8.2.0”.` or similar.</em></strong></p><p>Delete or downgrade the package which is causing the issue.</p><p>Run <strong><em>composer check-platform-reqs</em></strong><em> </em>to see which package is causing the issue.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cMYMlI2L12UVL5Xp7wNr7Q.png" /><figcaption><strong>treblle/security-headers</strong> requires php <strong>v8.2</strong> but my server only supports php <strong>v8.1 </strong>so i have to delete this package.</figcaption></figure><p>Update 4: After all the steps if you see 500 error, please check logs or double check your env file, wither its misconfigured or missing.</p><p>Even after 4+ years i am using the same document. To deploy laravel apps on shared hosting providers like GoDaddy, Hostinger etc, I often face the 500 server error, which is mostly. Caused by misconfigured .env with my local settings rather than server settings.</p><blockquote>Follow me on <a href="https://github.com/gopalindians"><strong>github.com</strong></a><strong> </strong>&amp;<strong> </strong><a href="https://twitter.com/gopalindians"><strong>twitter</strong></a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b36f443a6c5c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>