laravel-5.7

Problems with Pagination on Laravel 5.7

廉价感情. 提交于 2019-12-24 03:41:37
问题 I have the next problem I have a table called employments on mysql, and this table have the column idbusiness that's reference to table business. Well, My employments are like this id | idbusiness | name | address This is the line on my function for pagination: $employments = employments::paginate(10)->onEachSide(5); And my code in the showemploymets.blade.php {{$empleados->appends(request()->except('showemployments'))->links()}} The problem is when I select the IDBusiness = 1 its ok, show me

Changing the Default “Subject” Field for Verification Emails in Laravel 5.7

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-18 11:39:34
问题 I'm trying to change the default subject field in the verification email that comes with Laravel 5.7. How and where do I change it? I have searched all over the place by myself and online. Because it's brand new I can't find an answer. Can you help me, please? Thanks! 回答1: You don't need to code anything. The notification has all the strings wrapped in the Lang class so that you can provide translation strings from english to another language, or even english to english if you just want to

can't save calcution data when create new data

房东的猫 提交于 2019-12-13 04:58:34
问题 Model public static function findOrCreate($plan_id, $data) { $fromDate = Carbon::now()->subDay()->startOfWeek(); $nowDate = Carbon::now()->today(); $spent_time = static::where('plan_id', $plan_id)->first(); if (is_null($spent_time)) { return static::create($data); }else{ $new_spent_time = SpentTime::first(); $task_category = $new_spent_time->task_category; $new_spent_time->task_category = (['{task_category}' => $task_category, '{daily_spent_time}' => $new_spent_time->daily_spent_time, '{daily

in laravel my controller 3 filed value not passing

↘锁芯ラ 提交于 2019-12-13 03:19:08
问题 from view i am passing 4 values 1)name 2)user_filter_id 3)user_staff_id 4)ticket_id but it not only passing "ticket_id" other 3 values not working it showing error In View I am Passing This Value <ul class="chatonline style-none "> @foreach ($ticket_details as $key=>$ticket_detailss) <li> <h3 style="text-align:center ">TICKET ID<small class="text-success "><br type="text" id="ticket_id" name="ticket_id" >{{$ticket_detailss->ticket_id }}</small></h3> </li> <li> <h3 style="text-align:center "

failed to load component in laravel 5.8

a 夏天 提交于 2019-12-13 03:16:23
问题 I have below 2 components in vue.js and using in Laravel 5.8 Here is app.js file. require('./bootstrap'); import VeeValidate from 'vee-validate'; window.Vue = require('vue'); Vue.use(VeeValidate); Vue.component('profile', require('./components/Account/Profile.vue').default); Vue.component('change-password', require('./components/Account/changepassword.vue')); const app = new Vue({ el: '#app' }); Below is the code in change password component. <template> <div> </div> </template> When I build

Why my middleware is not working,I try to put some parameter inside the middleware and its not working

青春壹個敷衍的年華 提交于 2019-12-12 23:17:18
问题 My middleware should block user with restric_desc = Revoke Student Portal Access. But it end up blocking all user from accessing the tab. Route::group(['middleware' => ['auth'], 'request' =>App\Models\BlockReason::where('IS_ACTIVE','0')->pluck('ID')], function () { Route::group(['middleware' => 'block', 'request' => App\Models\BlockRestricType::where('RESTRIC_DESC', 'Revoke Student Portal Access')->pluck('ID')],function(){ My middleware public function handle($request, Closure $next) { $var=

Using configureMonologUsing after Laravel 5.7 upgrade - Supervisor Logging Permission

余生颓废 提交于 2019-12-12 01:13:13
问题 I am trying to upgrade my Laravel 5.5 project to 5.7. I use supervisor and before I was using configureMonologUsing() to generate the logs but apparently with 5.6 upgrade, it got depreciated. My full code in L5.5 was: in bootstrap/app.php: $app->configureMonologUsing( function( Monolog\Logger $monolog) { $processUser = posix_getpwuid( posix_geteuid() ); $processName= $processUser[ 'name' ]; $filename = storage_path( 'logs/laravel-' . php_sapi_name() . '-' . $processName . '.log' ); $handler =

How to Use custom request (make:request)? (laravel) Method App\Http\Requests\Custom::doesExistI does not exist

可紊 提交于 2019-12-11 22:03:27
问题 I created a custom request to make my own validation. As i follow these article. I created ProfileRequest php artisan make:request ProfileRequest Inside my ProfileRequest <?php namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; class ProfileRequest extends FormRequest { /** * Determine if the user is authorized to make this request. * * @return bool */ public function authorize() { return true; } /** * Get the validation rules that apply to the request. * * @return array

Laravel CRUD, Edit and Delete ID Not Found, But ID Exist

最后都变了- 提交于 2019-12-11 17:46:09
问题 Here is migration. Schema::create('ruanganjns', function (Blueprint $table) { $table->increments('id'); $table->string('kode_jenis_ruangan'); $table->string('jenis_ruangan'); $table->date('tgl_berlaku'); $table->string('status'); $table->timestamps(); }); Here is model. protected $table = 'ruanganjns'; protected $fillable = ['kode_jenis_ruangan','jenis_ruangan','tgl_berlaku','status']; public $timestamps = true; public function Ruangan() { return $this->HasMany('App\Ruangan','id_ruangan'); }

Laravel 5.7 email verify broken link

余生颓废 提交于 2019-12-11 17:13:10
问题 I followed Laravels docs (link) about Email verification. Everything seems to work except for a 403 - invalid signature . This errors shows when clicking on the email link. I'm using shared hosting. Url is similar to this: [..]email/verify/21?expires=154270[..]&signature=920dcb9ac2fbf5[..] would appreciate all the help I could get! Thanks! 回答1: Here is the answer: https://stackoverflow.com/a/44839664 You have to generate a key: php artisan key:generate 来源: https://stackoverflow.com/questions