Category : laravel-6.2

i wanna ask how to add get data from ProdukTable as p_nama into StockTable ? Im using Laravel 6.2 instead. what should i do ? Model : AppProduk.php <?php namespace App; use IlluminateDatabaseEloquentModel; class Produk extends Model { public $table = ‘produk’; protected $primaryKey = ‘pid’; protected $fillable = [ ‘pid’, ‘sku’, ‘p_nama’, ‘p_stock_min’, ‘p_stock’, ..

Read more

I am having difficulty extending to different layout file according to the if else condition @if($subdomain_alias === "blk") @extends("layouts.frontend-new") @section(‘title’) Home @endsection @section(‘content’) {{– Some Content –}} @endsection @else @extends(‘layouts.frontend’) @section(‘title’) Home @endsection @section(‘content’) {{– Some Content –}} @endsection @endif But the problem is both the layout is included and i can see everything twice. ..

Read more

i am using this code but i am not working old function i have used both using this <?php echo old(‘title’); ?> AND {{ old(‘title’) }} Both Are Not workin please Help <form action="<?php echo route(‘post.create’) ?>" method="GET"> @csrf <input type="text" name="title" value="<?php echo old(‘title’); ?>"></br> <textarea name="contant" id="" cols="30" rows="10"><?php echo old(‘contant’); ?></textarea> Source: ..

Read more

I need to send some values to my Controller’s constructor via Session, by default Session is not available on the constructor unless you insert this 2 lines in the Kernel’s middleware block: IlluminateSessionMiddlewareStartSession::class, IlluminateViewMiddlewareShareErrorsFromSession::class, The problem is that after I place those lines I get a 419 | Page Expired message on my view. Here ..

Read more

i have some fields in my database table, and i want to display title,description and keywords according to every page, Please let me know how i can display this. My database fields name are metatitle,metadesc,keyword Here are my Controller code where i am displaying the property list… public function listtype($slug){ $prtype= Listing::whereHas(‘proType’,function($q) use($slug){ $q->where(‘slug’,’like’,’%’.$slug.’%’); })->paginate(50); ..

Read more

in my projects i want when i create a user i want to send to him password and role in email through gmail i try many solutions but nothing happen any help .there is no errors but i can’t receive mail in gmail !!!!! this is my .env file: MAIL_DRIVER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=2525 MAIL_USERNAME=——–@gmail.com MAIL_PASSWORD=———– MAIL_ENCRYPTION=tls ..

Read more

I’m building a user management system… when I create a user and put an image in ‘avatar field’ the user will create successfully but when I let ‘avatar field’ empty he show me Token and the data that I insert in the field I already put @csrf in my form { “_token”:”f8UnQweYC4xR6WahdsUDlFGoGxyuyzm61rpBEXXXX”, “_method”:”post”, “email”:”[email protected]”, “name”:”example”, ..

Read more

when i load the page there’s no error at all in the console. but then, when i saw the url of the css and javascript. it got asset path appended twice e.g <link href=”http://localhost:8080/css/all.css/css/app.css” rel=”stylesheet”> <link href=”http://localhost:8080/css/all.css/css/all.css” rel=”stylesheet”> <script src=”http://localhost:8080/css/all.css/js/app.js” type=”text/javascipt” defer></script> <script src=”http://localhost:8080/css/all.css/js/script.js” type=”text/javascipt” defer></script> my .env file APP_URL is defined as http://localhost:8080 I ..

Read more