Skip to main content

Posts

Showing posts with the label Laravel Package

Open Source Assets Compiler For Projects

Assets Compilation I am from the laravel and actully now habitude to its process. It also reflected on assets ( scss/less/vuejs) compilation. I have tried multiple alternatives like preproce. But at last come to the laravel's built in packages.  Laravel's Assets Compilers  1) Laravel Elixir 2) Laravel Mix Both of the projects are shown here are the gift from the laravel developer to us. By the way this projects are created to work for laravel but you can use this project stand alone for your projects. This projects are npm based so you have to install them using the node package manager ( npm) or yarn. Some description about both 1) Laravel Elixri Laravel Elixir provides a clean, fluent API for defining basic Gulp tasks for your Laravel application. Elixir supports common CSS and JavaScript pre-processors like Sass and Webpack. Using method chaining, Elixir allows you to fluently define your asset pipeline. It's documentation says for Laravel App...

Full text search with TNTSearch in laravel

                       Every site which has an aim to provide information to the end user inform of blog or artilce has to have an efficient search. You can do it with sql query using %like% and where queries. But its not sufficient . Some time user don't have idea about the text of field you are using so it might not get information through your site. So in that case we need some kind of thing that can do full-text search. For example, You write an article name " Google ".                     Google is a search engine. Search engine is the program that helps to find the information we need from the database. Google is one of the best search engines in the world. ... .. Now you are just searching with name field with pure mysql . So if someone search for google . it will get result but , if will search for search engine result will be null . Here you can use...

Debug errors of external packages used in laravel project

            Sometime happens that you do everything that  read me file  said and still you get errors like class not found or file not found because you are getting just different version of package. The conman reason is below here. That might be unnoticed if you are beginner. Composer Requirement Mismatch Laravel packages are created by experienced Larvael and php developers. They are best at their work. But when we use that packages we get errors because we don't find out exact requirement for that package or at least for the particular version of the package.  For example requirement of the Laravel version requirement of the php version. There are many packages which have different versions for the different laravel version or for different php version . For example, spatie/laravel-analytics   vinkla/Instagram etc. Example   We will go with example of spatie/laravel-analytic...

Upload image with WYSIWYG editor in laravel

upload image with texteditior Almost every one who start learning any thing in web starts with creating a blogging web site in what ever technology or framework he starts to learn. When we create blog site for learning we just consider the text, but real problem happens when we are building the real blogging site because now we have to consider the images also. Most of the WYSIWYG  editors ( Summernote which is my favourite ) provides the facility to upload the image either through the url or user can upload image from the device. In those two situations  If user uploads image via link then there is no problem as it just put a img tag and set's it's source to the url of image But if user uploads image from its device than img tag stores the image as base64 data. Exact Idea So in the second option the actual image is sent to the server as the base64 encoded data,  That means if you applied summernote to a text area and upload a image than the req...

Debug Laravel App with Clockwork

Laravel is written in the way you can easily track the bug by the error or expection thrown by the laravel. Laravel containas the facility of logging. It logs every thing that happens. It stores this log data in the file name larvel.log. Laravel.log file can be found in the storage/logs folder of your laravel project. Most problem will be solving in laravel if you able to understand the logged data.  Laravel log file One thing that make us to use the external debuggers is run time data. Limitation of laravel's log is that it can not log the run time uninterpreted data, or at least i don't found the way to do so.  In this case we have two choise  1. we use the laravel's log driver and find the clever way to log the data of our interest.  2. We can use external debuggers like clockwork, laravel-debugger etc. The reason i need to find package like this In the project puberstreet.com i had to use the polymorphic relation for likes. I was st...

Laravel and google analytics

Google analytics  do what we need many time like recording the user interactions, page views, and the trend user follow while exploring the site. Laravel + Google Analytics Setup spatie/laravel-analytics You can read how to setup package here . It is quite easy but if you find any problem just ask in comment.