Category : laravel-7

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

Laravel 7. Cannot store to DB from form I cannot store info to DB It doesn’t store anything and returns to home page without any action what should i do? It takes all info to url but not storing, even dd($request) in PageController.php function store shows nothing! here is my index.blade.php @extends(‘layouts.app’) @include(‘inc.index-header’) @section(‘content’) <div ..

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

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