
Suppose you find yourself in a situation where you need to disable or intercept a console command in Laravel. This tutorial will primarily focus on how to intercept the php artisan migrate command. We'll delve into the command method app/Console/Keel.php and explore how to prevent the migrate command from executing any actions. Inside the command method of app/Console/Keel.php In Laravel 11 use routes/console.php Intercept command You can intercept php artisan migrate and, instead, catch it an...
ادامه مطلب
That begs the question how do you separate the time into seperate elements? Making use of explode can work. Exploding where there a : so: $parts = explode(':', '14:25:00'); This would result in an array: [ "14", "25", "00", ] To use an element you can refer to its index for example $parts[0] would contain 14 Using them by their index is fine to do but kinda messy. I prefer to give each element a name using the list function li...
ادامه مطلب
Running API tests you may be tempted to open PostMan or another API client, did you know, you can run HTTP requests from inside PhpStorm directly? When developing a new API, you will want to run the API endpoints. Being able to run them without leaving PhpStorm speeds up your workflow. To start a request file, you can either select a HTTP Request file when using the new file or create a new scratch file. For a scratch file select the HTTP Request type. In either case ...
ادامه مطلب
I've documented my PhpStorm setup, what theme I use, plugins, and keybindings. Theme I use the New UI which is located at Appearance & Behaviour -> New UI Once tued on I use the Light Theme: I like to keep things minimal, in fact, I tu off the toolbars and status bars by toggling distraction-free mode Plugins .env file support Environment variables completion based on .env, Dockerfile and docker-compose.yml files. Go to declaration(in .env ...
ادامه مطلب
The script generated by the Feedback Form Wizard has been updated to improve compatibility with PHP 8 (eg, 8.0, 8.1, etc). Note: if you have generated your form and script after 1 January 2023, you already have this version (ver 3.2.0). ...
ادامه مطلب
When upgrading from an Intel mac to an Apple Silicone I noticed docker fails to run. I'm using Laravel Sail when Sail is installed or when a sail up command is attempted I get an error: docker: 'compose' is not a docker command The reason for this is a docker-compose is now a plugin. Docker needs docker-compose to be installed. Use brew to install docker-compose brew install docker-compose Once installed sail will function normally without any extra setup. بخوانید...
ادامه مطلب
I wanted to create a table of contents from the post's heading tags automatically without having to change the headings like adding an id or anchor. I started to look at existing solutions and came across this custom function on Stackoverflow by sjaak-wish function generateIndex($html) { preg_match_all('/<h([1-6])*[^>]*>(.*?)</h[1-6]>/',$html,$matches); $index = "<ul>"; $prev = 2; foreach ($matches[0] as $i => $match){ $curr = ...
ادامه مطلب
This article on whether a domain name registrar is the same thing as a web host answers a question I was asked by a visitor....
ادامه مطلب
This article shows you how to insert a bullet point list (where each item on the list is marked with a solid black circle rather than numbered) into a web page using the BlueGriffon web editor....
ادامه مطلب
I was asked by a visitor why he couldn't dispense with a registrar and just make up any domain name he wanted. You may be surprised to hear that you can actually do that. But it won't do you any good....
ادامه مطلب
This article deals with how you can restore the Style Properties panel in the BlueGriffon web editor should you find it missing or not visible when you enable it....
ادامه مطلب
One of my visitors wanted his users to be able to choose a song from a list, and have it play in an audio player on his web page. This article provides the JavaScript and HTML code for the task....
ادامه مطلب
When a project grows the migrations folder can contain a lot of migration, ever wanted to desperate them into folders? tus out it's easy to so. All you need to do is tell Laravel where to read the migrations from. In your AppServiceProvider.php boot call, you can call $this->loadMigrationsFrom() and give it a path of all the folder locations: $migrationsPath = database_path('migrations'); $directories = glob($migrationsPath.'/*', GLOB_ONLYDIR); $paths = array_merge([$migra...
ادامه مطلب
What is ping submission in SEO? Ping Submission is the off page SEO process that tell search engine about newly created back link, blog post and website post. This process helps in crawling and indexing of your newly created backlink. It is very simple process, you have to submit your blog here and these sites start their work. Today, everyone runs in the race of making online presence as a form of website on the web. But, only establishing an online presence is not so enough these days, because...
ادامه مطلب
You may think designing a website is easy, but many businesses still make mistakes when building one. Those mistakes can reduce conversions and scare away leads Here I present to you eight website design mistakes you may make and how you can fix them. You Don’t Use The Right Templates Every website carries its own key function. For example, an e-commerce website aims to sell products, while a port...
ادامه مطلب
Creating profile on the social media platform is the greatest way to reach closer to your viewers and increase web traffic of website. Profile creation sites spread the magic of their amazing profile ...
ادامه مطلب
Press Release is the listed in top off page seo technique that use to distributing news about your business. Also it help when you relocate your business from one location to other, then you can write...
ادامه مطلب
Lots of people don’t know the benefits of review submission and review submission site. They never hear the terms of review and why people submit them. How review and review submission helps in Local ...
ادامه مطلب
If you start reading this article than may be want to know what Yext Listing is and why people Use it. Before we know more about Yext listing we need to know what is listing in SEO. Listing is a Mecha...
ادامه مطلب
It’s rapidly nearing the end of 2018, which means ride sharing services have been around for nearly five years. In that short period of time, ride sharing has developed into a massively popular indust...
ادامه مطلب