Showing posts with label Laravel. Show all posts
Showing posts with label Laravel. Show all posts

Friday, September 25, 2020

Oauth Public Key Does Not Exist in Laravel

 


Solution:



Monday, August 24, 2020

Installing Specific Laravel Version Using Composer

 composer create-project laravel/laravel=5.5 lav55fresh --prefer-dist

Example:


Tuesday, January 2, 2018

Drop Table Index in Laravel 5.3

Before deleting index :
Result :

see the previous post about adding index...

Create Composite Index in Lavel 5.x

Create migration first ...

Edit our migration file like this :
Executing migration file :
Doneee...


For deleting index. Please see this post...

Wednesday, May 10, 2017

Info Seputar Laravel Cache

# Nyimpen
Cache::put($key, $value, $peride)

bisa jg pake add kek gini :
Cache::add($key, $value, $periode-dlm minutes)-->ini nyimpen klu emg blom ada

nyimpen selamanya :
Cache::forever($key, $value);


#Ngambil
$value = Cache::get($key)

atw bisa peke yg ini jg : (ngambil, tp klu blom ada nyimpen ssaui return $value)
Cache::remember($key, $minutes, function() {
    return $value;
});


#Ngapus
Cache::forget($key) -->apus sesuai key
Cache::flush() --> apus semua cache

#Ngecek

Cache::has($key);

Tuesday, May 9, 2017

Wednesday, April 12, 2017

Viewing Messages & Session in Laravel 5.3

Here is my sample code :

If we run it on laravel 5.3, then we can get something like this :


Tuesday, April 11, 2017

Sending Email Using Queue (SMTP-GMAIL) in Laravel 5.3 - Part I

In previous post, we have successfully sent an email using Mail::send with some of it's properties and we sent this email using default way or not using background worker or in another word 'queue'. So Right now, we are going to play queue to the email using smtp-gmail :D. mmmm......... Next please follow below instructions
1. Create table for queue and also failed-table too. Queue table is for saving list of some jobs (emails that will be sent) and failed-table is for saving failed list of our emails. For creating those tables, we can use these commands :
php artisan queue:table
php artisan queue:failed-table
So we have two migration files now :
Next, execute migration command:
php artisan migrate
Aaand now we have two tables in our phpmyadmin :
2. Change QUEUE_DRIVER = sync to database on .env file :

3. Create new job :
php artisan make:job {your-job-file-name}

4. Let's create a new route and controller...
5. Actually, we can do this step in step 3, buuut... mmmm.... yaaah... it's okie to seperate it in another step... :D
So... in this step 5, let's complete our handle method :




6. Run php artisan queue:listen
This command is the starting point for our queue job to be executed by laravel.

Tuesday, March 14, 2017

'stream_socket_enable_crypto(): ssl3_get_server_certificate:certificate verify failed' on Laravel 5.3

Here's the error message :
`'stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed', `

I just changed the MAIL_DRIVER from smtp to mail on my laravel env file


MAIL_DRIVER=mail
MAIL_HOST=hyosoka.host.co
MAIL_PORT=587
MAIL_USERNAME=hyosokateam
MAIL_PASSWORD=pass
MAIL_ENCRYPTION=tls
MAIL_DOMAIN='@mail.test.hyosoka.co'

If the problem still persist and if you are using windows, sometimes please disable your antivirus. Because sometimes antivirus is blocking your windows port. Or change the MAIL_PORT to another port, for example 2578, 2525, etc

Monday, January 9, 2017

Delete using DB::table in Laravel


If delete() successfully executed it will return 1. but if not, then 0... 0 happens when data is already deleted.. :D

Wednesday, January 4, 2017

Cron Maker for Laravel

http://www.cronmaker.com/

Put the cron format here :

Doneee... It's ready to deploy to elasticbeanstalk amazon...


artikel ygn blom diliad :
https://maxoffsky.com/code-blog/practical-laravel-using-cron-jobs-in-laravel/