laravel-5.1

custom auth and hashing laravel 5.1

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-22 01:02:19
问题 I have an existing database. users : username => varchar password => md5 hashing I am new to laravel, I was try to create simple login and register from laravel docs, thats work fine, but in docs are create for laravel, now I want to create same login/register but with existing datas. I was read some Question from How to use SHA1 encryption instead of BCrypt in Laravel 4? but I dont understand how to use it. any adv? sory for my bad grammer. 回答1: I'll Try to answer my question. I take it from

crontab command not found in my git-bash for windows 7

情到浓时终转凉″ 提交于 2019-12-22 00:55:23
问题 I cannot use crontab -e in my git that I installed it in my pc windows 7. It produced the error bash: crontab: command not found Did someone use to do it, please tell me? 回答1: I confirm that even the latest git for windows (2.6.3) with its 4.3.42(3)-bash does not include any cron command. You would need to use another "cron from Windows", like the official Microsoft command Schtasks.exe. 来源: https://stackoverflow.com/questions/33775581/crontab-command-not-found-in-my-git-bash-for-windows-7

How to Integrate Paypal Payment gateway in laravel?

左心房为你撑大大i 提交于 2019-12-21 20:21:54
问题 How to Integrate Paypal Payment gateway in Laravel? I tried this http://www.17educations.com/laravel/paypal-integration-in-laravel/ but config have some problem,Please anybody say some ideas 回答1: Follow Bellow Few Step: 1)Install Laravel Application 2)Database Configuration 3)Install Required Packages 4)configuration paypal.php file 5)create route 6)create controller 7)create view file Step 1 : Install Laravel Application we are going from scratch, So we require to get fresh Laravel

How to Integrate Paypal Payment gateway in laravel?

有些话、适合烂在心里 提交于 2019-12-21 20:20:01
问题 How to Integrate Paypal Payment gateway in Laravel? I tried this http://www.17educations.com/laravel/paypal-integration-in-laravel/ but config have some problem,Please anybody say some ideas 回答1: Follow Bellow Few Step: 1)Install Laravel Application 2)Database Configuration 3)Install Required Packages 4)configuration paypal.php file 5)create route 6)create controller 7)create view file Step 1 : Install Laravel Application we are going from scratch, So we require to get fresh Laravel

Laravel Socialite first and last name

大城市里の小女人 提交于 2019-12-21 16:57:59
问题 I'm adding social authentication to an application using Laravel's Socialite. I can retrieve the full name but not the first and last names separately. After the callback happens and Socialite is handling it, the user is retrieved successfully. If I am to dump the user I get back from $user = this->social->driver('facebook')->user(); I get the following: object(Laravel\Socialite\Two\User)#459 (8) { ["token" ]=> string(209) "{token}" ["id"] => string(17) "{socialID}" ["nickname"] => NULL [

Change date format laravel 5

99封情书 提交于 2019-12-21 11:33:15
问题 i have something problem in there i want to change date format. this my view : @foreach ($posts as $post) <tr> <td> <?php echo $post->id?> </td> <td class="mailbox-star"><?php echo $post->nama?></td> <td class="mailbox-name"><?php echo $post->tanggal?></td> <td class="mailbox-subject"><?php echo $post->deskripsi?></td> <td class="mailbox-date"><?php echo $post->mulai?> - <?php echo $post->durasi?></td> <td class="mailbox-date"><?php echo $post->total?> Jam</td> <td class="mailbox-date"> <a

Add meta tags to laravel page

两盒软妹~` 提交于 2019-12-21 09:35:43
问题 I'm trying to add description and keywords to my Laravel pages. Is this way working? Or there is something wrong? @section('title') {{trans('strings.About')}} @stop @section('description', 'Share text and photos with your friends and have fun') @section('keywords', 'sharing, sharing text, text, sharing photo, photo,') @section('robots', 'index, follow') @section('revisit-after', 'content="3 days') 回答1: Are you extending another template that uses all these sections ? They won't work on their

Laravel Eloquent: Best Way to Calculate Total Price

蹲街弑〆低调 提交于 2019-12-21 07:11:33
问题 Im building a simple buy and sell application with Laravel 5.1. Each Buy Model has many BuyDetail which stores bought item quantity and buy_price. I have implement the relationship between table on the Model. class Buy extends Model { #Eloquent relationships public function supplier() { return $this->belongsTo('App\Supplier'); } public function buyDetails() { return $this->hasMany('App\BuyDetail'); } } I'd like to calculate the total price for each Buy. What is the best way to calculate the

Laravel validation OR

拜拜、爱过 提交于 2019-12-21 05:16:21
问题 I have some validation that requires a url or a route to be there but not both. $this->validate($request, [ 'name' => 'required|max:255', 'url' => 'required_without_all:route|url', 'route' => 'required_without_all:url|route', 'parent_items'=> 'sometimes|required|integer' ]); I have tried using required_without and required_without_all however they both get past the validation and I am not sure why. route is a rule in the route field 回答1: I think the easiest way would be creation your own

How to paginate a “has many” relationship that is ordered?

醉酒当歌 提交于 2019-12-21 04:43:15
问题 I would like to paginate the following relationship (a Category having many Apps): class Category extends Model { public function apps() { return $this->hasMany('App\App')->orderBy('current_price', 'asc'); } } The problem is, when I add ->paginate(10); to the end of that line, I get the following error: Relationship method must return an object of type Illuminate\Database\Eloquent\Relations\Relation What am I missing here? 回答1: Have you tried this? $category = Category::first(); $apps =