Category : laravel-7

I have 2 commands in my Laravel 7 Schelduler $schedule->command(‘inspire’)->everyMinute()->emailOutputTo(env(‘MAIL_TO’)); $schedule->exec(‘whoami’)->everyMinute(); ✅ The first one works perfectly, I get the email ❌ This second one doesn’t work at all $schedule->exec(‘whoami’)->everyMinute(); I followed: https://laravel.com/docs/7.x/scheduling Any hints for me ? Sourc..

Read more

I’m on Laravel 7, and I followed this https://laravel.com/docs/7.x/scheduling and did this $schedule->command(‘inspire’)->everyMinute()->emailOutputTo(env(‘[email protected]’)); $schedule->command(‘contact:clean’)->everyMinute()->emailOutputTo(env(‘[email protected]’)); I ran this app2020 php artisan schedule:run and get this Running scheduled command: ‘/usr/local/php5-7.3.8-20190811-205217/bin/php’ ‘artisan’ inspire > ‘/Users/app/Sites/app2020/storage/logs/schedule-7c649d5e8c778c3791224941d519342306721dac.log’ 2>&1 Running scheduled command: ‘/usr/local/php5-7.3.8-20190811-205217/bin/php’ ‘artisan’ contact:clean > ‘/Users/app/Sites/app2020/storage/logs/schedule-970eece0284bc3f5e59410e7b76e16920bbcaf5c.log’ 2>&1 and saw no emails coming in to my Mail Did I miss anything ..

Read more

Let’s say we use the same table schema for saving purchased products of orders for website A and B. Databases for A and B locate in different servers. So 2 database connections are defined. CREATE TABLE `order_products` ( `id` int(11) NOT NULL AUTO_INCREMENT, `order_id` int(11) NOT NULL DEFAULT ‘0’, `product_id` int(11) NOT NULL DEFAULT ‘0’, ..

Read more

I have just install package from github. i want my input form in blade can get validation. when user enter wrong validation, error message will appear. i’m new in laravel 7. I need help. this is link for package i want use this is my input at blade <input id="icpenjawat" type="mykad" pattern="[0-9]+" maxlength="12" class="form-control @error(‘icpenjawat’) ..

Read more

this is code from laravel API public/index.php file. $kernel = $app->make(IlluminateContractsHttpKernel::class); $response = $kernel->handle( $request = IlluminateHttpRequest::capture() ); $response->send(); $kernel->terminate($request, $response); When sending a request it returns without any data and with status code: 200 just from $kernel->handle. When I print dd(‘111′); before $response = $kernel->handle( $request = IlluminateHttpRequest::capture() ); it is shown in request’s ..

Read more

I had received a SQL dump file for an existing database There is a table with date_from and date_to columns they are both type timestamp but date_to column has a default value of "0000-00-00 00:00:00". and when trying to add softdeletes to this table like following : Schema::table(‘gamesessions’, function (Blueprint $table) { $table->softDeletes(); }); i ..

Read more

Morning! I’m programming a laravel 7 multitenancy project using hyn package version 5.6 For now i have a principal app (localhost) and a subdomain (tecnotienda.localhost). But when i route them it ussually overlaps, i mean: it just shows the principal or just shows the subdomain. This is my routes/web.php <?php use IlluminateSupportFacadesRoute; use AppHttpControllersReportController; /* ..

Read more

If I try to connect the Laravel 7 (PHP 7.3) app with PostgreSQL 12.4 in AWS RDS through SSL, it’s throwing this error SQLSTATE[08006] [7] SSL SYSCALL error: Connection reset by peer (SQL: select column_name from information_schema.columns where table_schema = public and table_name = roles) It is working fine with PostgreSQL 11.8, the above error ..

Read more

trying to define a model mutators <?php namespace App; use IlluminateDatabaseEloquentModel; class Custom_fields extends Model { protected $table = ‘custom_fields’; public function set_contentAttribute($value){ return unserialize($value); } } accessing the field _content and unserialize the value of the field so I can get an array automatically on retrieve but seems not working. Any help, ideas? Source: ..

Read more

I ran this query $data = Visitor::where(‘created_at’, ‘>’, now()->subWeek())->get()->pluck(‘created_at’); dd($data); I got this IlluminateSupportCollection {#521 ▼ #items: array:72 [▶] } I have 72 visitors since last 7 days. How do I modify my query to get something like this ? Note 0-6 day of week, sunday(0) & saturday(6) { 0:10, 1:10, 2:10, 3:10, 4:10, 5:10, ..

Read more