PHP Classes

File: routes/web.php

Recommend this page to a friend!
  Classes of uche   ajalaBot PHP Facebook Messenger Bot   routes/web.php   Download  
File: routes/web.php
Role: Example script
Content type: text/plain
Description: Example script
Class: ajalaBot PHP Facebook Messenger Bot
Help Facebook Messenger users to find tours
Author: By
Last change:
Date: 2 years ago
Size: 1,366 bytes
 

Contents

Class file image Download
<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/


Route::get('/', function (){
   
//echo 'Ajala Bot';
});
Route::get('/policy', 'MenuController@policy');

//Route::get('/bot', 'BotController@bot')->middleware('verifybot');

Route::match(['post', 'get'], '/bot', 'BotController@bot')->middleware('verifybot');
//Auth::routes();

Route::get('/home', 'HomeController@index')->name('home');

Route::get('sendemail', function () {
   
//return view('emails.welcome');

   
$data = array(
       
'name' => "Learning Laravel",
    );

   
$mail = Mail::send('emails.welcome', $data, function ($message) {

       
$message->from('yourEmail@domain.com', 'Learning Laravel');
       
$message->cc('radioactive.uche11@gmail.com')->subject('Learning Laravel test email');
       
$message->to('naijacompetitions@gmail.com')->subject('Learning Laravel test email');

    });
    if(
$mail){
        return
'true';
    }else{
        return
error_get_last()['message'];
    }
   
//return "Your email has been sent successfully";


});