laravel-5.5

Sending mail with Laravel on shared hosting

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-21 06:40:20
问题 I'm trying to send mail from my website. I'm using laravel 5.5 and the shared hosting of hostnet.nl. I'm very sure i have all my configuration correct.. My .env : MAIL_DRIVER=mail MAIL_HOST=smtp02.hostnet.nl MAIL_PORT=587 MAIL_USERNAME=username MAIL_PASSWORD=password MAIL_ENCRYPTION=TLS But when i try to send mail this allways returns Whoops there was an error: proc_open() has been disabled for security reasons I already chat with the hosting company and they said this is not a php setting

How can I implement Laravel 5.5 and Angular 4 project intogether?

女生的网名这么多〃 提交于 2019-12-21 02:54:23
问题 If I want to implement Angularjs 4 or 2 with Laravel 5.5 (angular will consume the API from laravel), what should be the best method? 1) Should I create two folders in xampp/htdocs like c:/xampp/htdocs/test-laravel55 and c:/xampp/htdocs/test-angular4 OR 2) Should I create a project of laravel 5.5 like c:/xampp/htdocs/test-laravel55 and put the angularjs4 (e2e, node_modules, src) files & folders into test-laravel55? If method 1 is better, can you kindly recommend me some links/ videos to

Poor whereHas performance in Laravel

≯℡__Kan透↙ 提交于 2019-12-20 09:01:13
问题 I want to apply a where condition to relation. Here's what I do: Replay::whereHas('players', function ($query) { $query->where('battletag_name', 'test'); })->limit(100); It generates the following query: select * from `replays` where exists ( select * from `players` where `replays`.`id` = `players`.`replay_id` and `battletag_name` = 'test') order by `id` asc limit 100; Which executes in 70 seconds. If I manually rewrite query like this: select * from `replays` where id in ( select replay_id

Laravel : how can i validate reset_password table token and request token

99封情书 提交于 2019-12-20 06:27:52
问题 I just reset password in my app.So i check user availability with email,phone if user is available store token in reset_password table and return token in response. But when i check reset_password table token and response token both are different.? How can i check and validate request token and stored token. note: Tested in postman $api->post('confirmuser', 'App\\Api\\V1\\Controllers\\Auth\\ForgotPasswordController@confirmUser'); Here is my controller code with email and phone i validate, if

Laravel manual login function

谁说我不能喝 提交于 2019-12-19 02:51:53
问题 I use manual login function in Laravel 5.5. Stuck in login. and check all(5 relevant ) Stack links and didn't find any clue on it. Achievement is once user get registered, automatically sign in that user. Error is "Type error: Argument 1 passed to Illuminate\Auth\SessionGuard::login() must implement interface Illuminate\Contracts\Auth\Authenticatable, string given, called in Server/vendor/laravel/framework/src/Illuminate/Auth/AuthManager.php on line 294 ◀" if ($validator->fails()) { //

Laravel 5.5 login and register page says:The page has expired due to inactivity.[TokenMismatchException]

杀马特。学长 韩版系。学妹 提交于 2019-12-17 18:41:13
问题 I just created a new project of laravel version 5.5 with the laravel installer.And run the command " php artisan make:auth ".The views and controller are generated for the user authentication.And also run " php artisan migrate " to create tables needed in the database.When visiting the login page and register page,filling the form and submit.It shows "The page has expired due to inactivity. Please refresh and try again.".But refreshing the page does nothing help. Seen in the source code,where

include a column of pivot table on call relationships

假如想象 提交于 2019-12-13 20:22:49
问题 Suppose we have a PriceList model like this: class PriceList extends Model { protected $primaryKey = 'price_list_id'; public function products() { return $this->belongsToMany(Product::class, 'price_lists_products', 'price_list_id', 'product_id')->withPivot('price'); } } And in the other hand Product is like: class Product extends Model { public function price_lists() { return $this->belongsToMany(PriceList::class, 'price_lists_products', 'product_id', 'price_list_id')->withPivot('price'); } }

Access @store arguments in “create policy”

♀尐吖头ヾ 提交于 2019-12-13 17:34:19
问题 I have a route like this in routes/api.php : Route::group(['middleware' => 'auth:api'], function() { Route::post('messages/{pet}', 'MessageController@store')->middleware('can:create,message'); }); We see here that it has implicit {pet} . My controller accesses {pet} just fine like this: app\Http\Controllers\MessageController.php : public function store(Request $request, Pet $pet) { dd($pet); } I want to my ->middleware('can:create,message') to get the arguments of store seen here, so I want

How to use where not between in Laravel 5.5?

你。 提交于 2019-12-13 10:12:26
问题 I am try ing to get something like this select * from `users` inner join `settings` on `users`.`id` = `settings`.`user_id` and NOW() NOT BETWEEN quit_hour_start AND quit_hour_end where `notification_key` != '' and `device_type` = 'Android' in eloquent. Does anyone try and get success to build this query in eloquent. I know I can use \DB::select(DB::raw()); and get my result. But I want to use ie with Laravel eloquent method. ====== update comment for tried queries======== $androidUser = User:

Commands not recognised in php-telegram-bot on a laravel Project

孤者浪人 提交于 2019-12-13 03:50:48
问题 I'm using php-telegram-bot/core in larvel 5.5 to make a telegram bot. I followed all installation and add custom commands described here. First in the web.php route file I added this : Route::get('/setwebhook', 'BotController@setWebhook'); Route::post('/webhook', ['as' => 'webhook', 'uses' => 'BotController@Webhook']); and this is BotController structure : namespace App\Http\Controllers; use Illuminate\Support\Facades\Log; use Longman\TelegramBot\Request; class BotController extends