Skip to main content

Posts

Tricks and Tips

1. How to rename folders in Linux ============================ mv command syntax form is as follows: ---------------------------------- mv old-name new-name mv [options] old-name new-name mv [options] source target 2. How do I delete multiple lines in nano without affecting the clipboard? ====================================================================== nano of course can delete blocks, see this article😊 use CTRL+Shift+6 to mark the beginning of your block move cursor with arrow keys to the end of your block, the text will be highlighted. use CTRL+K to cut/delete the block. To paste the block to another place, move the cursor to the position and the use of CTRL+U . You can paste the block as often as you want to.

proc_open(): fork failed - Cannot allocate memory

Error : Installation failed, deleting ./composer.json. The following exception is caused by a lack of memory or swap, or not having swap configured Check https://getcomposer.org/doc/articles/troubleshooting.md#proc-open-fork-failed-errors for details Follow Below steps: ====================== Troubleshooting# This is a list of common pitfalls on using Composer, and how to avoid them. General# Before asking anyone, run composer diagnoses to check for common problems. If it all checks out, proceed to the next steps. When facing any kind of problems using Composer, be sure to work with the latest version. See self-update for details. Make sure you have no problems with your setup by running the installer's checks via curl -sS https://getcomposer.org/installer | php -- --check. Ensure you're installing vendors straight from your composer.json via rm -rf vendor && composer update -v when troubleshooting, excluding any possible interferences with ex...

Getting Started with Laravel 5.4 with sample CURD

/* |----------------------------------------------------------------------------- | Getting Started with Laravel 5.4 |----------------------------------------------------------------------------- | | Laravel 5.4 has more features and Laravel is a free, open-source PHP web  | framework, created by Taylor Otwell and intended for the development of  | web applications following the model–view–controller (MVC) architectural pattern. | */ Database: Migrations #Generating Migrations ---------------------------- To create a migration, use the make:migration Artisan command: Syntax: php artisan make:migration create_users_table The new migration will be placed in your database/migrations directory. Each migration file name contains a timestamp which allows Laravel to determine the order of the migrations. Example: vagrant@homestead:~/sample$ php artisan make:migration create_student_table    Created Migration: 2017_08_01_044007_create_student_t...

PHP Artisan Commands

Laravel Framework 5.4.30 Usage: -------------------------   command [options] [arguments] Options: -------------------------   -h, --help            Display this help message   -q, --quiet           Do not output any message   -V, --version         Display this application version       --ansi            Force ANSI output       --no-ansi         Disable ANSI output   -n, --no-interaction  Do not ask any interactive question       --env[=ENV]       The environment the command should run under   -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug Available commands: -------------------------   clear-compiled       Remove the compiled class file   down ...

Issues Fixed in Laravel

-------------------------------------------------------------------------------------- 1. Missing routes.php File in New Laravel Project -------------------------------------------------------------------------------------- The lastest version of Laravel doesn't have a routes.php file. This 'routes.php' file was located in \app\Http in the older versions. In the newer version, Laravel 5.3, we have a folder named 'routes', where we can find the following files: api.php console.php web.php For this new version, the routes for your controllers, you can put inside web.php file See the documentation about routing here https://laravel.com/docs/5.3/routing#basic-routing The video lesson you are watching may be outdated. -------------------------------------------------------------------------------------- 2. Could not open input file: artisan -------------------------------------------------------------------------------------- You need to first cr...

Difference between laravel and codeigniter

Yeah of course both languages are doing good. we have some advantages and the disadvantages too. It also need look based on the requirements from the user and satisfication. condeigniter has the version 3 and laravel 5.4 versions. It just goes on with the updates and features. Any how some differences should be down here!. The difference between laravel and codeigniter features                                                     LARAVEL CODEIGNITER 1. ORM(Object Relational Mapper) -  yes                   - 2. Active record -  Yes                 Yes 3. Packaged module                            -  yes ...

Laravel Installation and Configuration

--------------------------------------- Installation --------------------------------------- ***If your using laravel then it's highly recommended that you use Homestead as your local Laravel  development environment: 1. The directory permissions will be set if your having the homestead 2. Application key should be 32 characters long and it can be set in .evn file 3. And need to rename the environment file (i.e) .evn.example file to .env    Note: if the application key doesn't set, your user sessions and other encrypted data will not be secure! A).  Additional Configuration cofiguration in config/app.php file It may contains serveral options such as timezone and locale a). The additional componants => Cache => Session => Database 4.  Web Server Configuration   #Pretty URLs    A). Nginx If you are using Nginx, the following directive in your site configuration will direct to the index.php frontend con...