How to get the route method type in Laravel
If you want to get the method type in Laravel, I believe this would be one of the easiest way. ## In the Controller ```php public function store(Request $request){ if($request()->method() == "PO...
Laravel handle Guzzle Error
Hi, If you have ever face such kinds of the issue where you are trying use `getStatusCode()` is guzzle, however, you are always getting default laravel error page, then this post will help you. In...
How to get content of Tinymce textarea via JS
Hi, If you want to get content of Tinymce WYSIWYG editor via JavaScript or VueJS, this is the snippet that you can use. ``` // Get the HTML contents of the currently active editor tinyMCE.activeEd...
TinyMCE error this domain is not registered with Tiny Cloud
Hi, If you are planning to integrate Tiny WYSIWYG editor in your textarea, you might able to see this error __This domain is not registered with Tiny Cloud. Start a free trial to discover our premiu...
Use Axios globally to any component in the VueJS
Hi, If you want to use `axios` globally to any components in the VueJS, you can follow these steps: In `main.js` you can just assign Axios to `$http`. __main.js__ ```js import Axios from 'axios'...
How to add Bootstrap in VueJS
Hi, Most developers prefer to use __BootstrapVue__ in your application that is maintained by another community. Unfortunately, there are not many tutorials or tips on how to use Bootstrap core in Vu...
Laravel API add Access-Control-Allow-Origin in the header response
Hi, If you are using Laravel as backend and some other service for the frontend, where you want to add `Access-Control-Allow-Origin` in the API header response because of __ 'Cross-Origin Request Bl...
Vuejs error: Unexpected console statement (no-console)
If you using Vue CLI and you are trying to print out something in the console, you might face this problem at the beginning of your project. In your component, if you use `console.log()` you might f...
PHP Storm search any text in the whole project
Hello If you need to know how to search any text in the whole project via PHP Strom, this snippet will help you. #### Mac Run `cmd+shift+f` and add your keyword. #### Windows Run `ctrl+shift+f`...
Laravel Vue.JS Failed to mount component: template or render function not defined
Hello, If you have such kind of error __Laravel Vue.JS Failed to mount component: template or render function not defined__, then I figure it out by adding `.default` at the end of the `require()`...
How to remove folders with SSH
If you need to remove folder or folders with SSH, you can use this command- ``` rm -rf foldername/ ``` It should work fine. Thank you.
How to get a domian name from the URL
Hi, If you want to get the domain name from a url, this snippet might be helpful for you. ```php $url = 'http://laravel-school.com/posts/understanding-autoload-and-namespace-in-php-57'; $...
How to display break in Laravel blade properly?
If you use textarea and want to display break, the paragraph on the blade side here is the easiest way to do that, I guess. You just use the following style- ``` {!! nl2br(e("Your text")) !!} `...
Laravel how to Merge Two Eloquent Collections?
If you want to merge two collections in Laravel eloquent, here is the easiest way to do that. ```php $users = User::all(); $profiles = Profile::all(); $usersAndProfiles = $users->merge($pro...
How to use str_plural() function in laravel
Sometimes, you may need to make some words plural based on the number counting. For example, you want to tell how many total users. If the total user is `1`, then it should be `user`. On the other han...