By using Carbon library in Laravel, We can easily grab the details between 2 dates.
$to = \Carbon\Carbon::now();
$from = \Carbon\Carbon::createFromFormat(‘Y-m-d H:i:s’, ‘2018-05-14 14:21:53’);
$diff_in_days = $to->diffInDays($from);
If you found error something like below while doing migration,
Illuminate\Database\QueryException : SQLSTATE: Syntax error or access violation: 1231 Variable 'sql_mode' can't be set to the value of 'NO_AUTO_CREATE_USER' (SQL: select * from information_schema.tables where table_schema = fisica and table_name = migrations)
In the config/database.php, Add My MySQL array ended up like this:
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'strict' => true,
'engine' => null,
'modes' => [
Then, it works like a charm.
Some time you need to convert currency into another currency like USD to EUR, Ruppe to USD. so, you can done this by yahoo API yes yahoo provide to programmer to open source API for any currency convert to another currency
Simple make one function and write following code in your function.
Continue reading “Currency Converter Help Of Yahoo API”
#1 — Laravel
Laravel is an open source PHP web development framework for building quality apps quickly. This is a very powerful programming framework with elegant way of syntaxes.
#2 — Object Oriented PHP
Continue reading “Web development technologies you can learn in 2018”