Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=geotours
DB_USERNAME=root
DB_PASSWORD=null

BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
19 changes: 19 additions & 0 deletions app/ContactUS.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

namespace App;

use Illuminate\Database\Eloquent\Model;


class ContactUS extends Model
{
public $table = 'contactus';

public $fillable = ['name','email','message'];

public function googlemap() {

return $this->hasMany('App\googlemap');
}

}
13 changes: 13 additions & 0 deletions app/Contacts.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Contacts extends Model
{
protected $table ="contactInfo";


public $timestaps = false;
}
18 changes: 18 additions & 0 deletions app/Http/Controllers/Admin/AdminController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace App\Http\Controllers\Admin;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class AdminController extends Controller
{
public function __construct()
{
$this->middleware('admin');
}
public function dashboard()
{
return view('admin.layout');
}
}
28 changes: 28 additions & 0 deletions app/Http/Controllers/Adminauth/Authcontroller.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

namespace App\Http\Controllers\Adminauth;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Auth;

class Authcontroller extends Controller
{

protected $redirectTo = '/admin';
protected $guard='admin';
public function showLoginForm()
{

if(Auth::guard('admin')->check())
{
return redirect('admin/login');
}
return view ('login');
}
public function logout()
{
Auth::guard('admin')-> logout();
return redirect('/');
}
}
2 changes: 1 addition & 1 deletion app/Http/Controllers/Auth/ForgotPasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ public function __construct()
{
$this->middleware('guest');
}
}
}
10 changes: 2 additions & 8 deletions app/Http/Controllers/Auth/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,14 @@ class LoginController extends Controller

use AuthenticatesUsers;

/**
* Where to redirect users after login.
*
* @var string
*/
protected $redirectTo = '/home';

/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->redirectTo = config('quickadmin.route');
$this->middleware('guest', ['except' => 'logout']);
}
}
}
6 changes: 3 additions & 3 deletions app/Http/Controllers/Auth/RegisterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace App\Http\Controllers\Auth;

use App\User;
use Validator;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Validator;
use Illuminate\Foundation\Auth\RegistersUsers;

class RegisterController extends Controller
Expand All @@ -23,7 +23,7 @@ class RegisterController extends Controller
use RegistersUsers;

/**
* Where to redirect users after registration.
* Where to redirect users after login / registration.
*
* @var string
*/
Expand Down Expand Up @@ -68,4 +68,4 @@ protected function create(array $data)
'password' => bcrypt($data['password']),
]);
}
}
}
9 changes: 1 addition & 8 deletions app/Http/Controllers/Auth/ResetPasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,6 @@ class ResetPasswordController extends Controller

use ResetsPasswords;

/**
* Where to redirect users after resetting their password.
*
* @var string
*/
protected $redirectTo = '/home';

/**
* Create a new controller instance.
*
Expand All @@ -36,4 +29,4 @@ public function __construct()
{
$this->middleware('guest');
}
}
}
41 changes: 41 additions & 0 deletions app/Http/Controllers/ContactUSController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\googlemap;
use App\ContactUS;
class ContactUSController extends Controller
{
public function contactUS()
{





$googlemap=googlemap::where('regioninfo_id',10)->get();


return view('contactUs')->with ('googlemap' , $googlemap);
}

/**
* Show the application dashboard.
*
* @return \Illuminate\Http\Response
*/
public function contactUSPost(Request $request)
{
$this->validate($request, [
'name' => 'required',
'email' => 'required|email',
'message' => 'required'
]);

ContactUS::create($request->all());


return back()->with('success', 'Thanks for contacting us!');
}
}
23 changes: 23 additions & 0 deletions app/Http/Controllers/ContactinfoController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

namespace App\Http\Controllers;

use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Http\Request;
use App\contacts;


class ContactinfoController extends Controller
{
public function contacts() {

$contacts=contacts::all();

return view('contact')->with ('contacts', $contacts);


}
}
38 changes: 3 additions & 35 deletions app/Http/Controllers/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,13 @@

namespace App\Http\Controllers;

use App\Http\Controllers\Traits\FileUploadTrait;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Http\Request;
use DB;

class Controller extends BaseController
abstract class Controller extends BaseController
{
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;

function insert(Request $req){

$regionName =$req->input('regionName');
$regionCity = $req->input('regionCity');
$aboutTours = $req->input('aboutTours');
$aboutPlace =$req->input('aboutPlace');

$data =array('regionName'=>$regionName,"regionCity"=>$regionCity, "aboutTours"=>$aboutTours,"aboutPlace"=>$aboutPlace);

DB::table('users')->insert($data);
echo "success";
}




function getData()
{
$data['data'] = DB::table('users')->get();
if (count($data) > 0)
{

return view('insertForm', $data);
}
else
{
return view ('insertForm');
}
}

use AuthorizesRequests, DispatchesJobs, ValidatesRequests, FileUploadTrait;
}
28 changes: 28 additions & 0 deletions app/Http/Controllers/HomeController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class HomeController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
}

/**
* Show the application dashboard.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
return view('home');
}
}
33 changes: 33 additions & 0 deletions app/Http/Controllers/RegioninfoController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

namespace App\Http\Controllers;

use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Http\Request;
use App\Regions;
use App\googlemap;


class RegioninfoController extends Controller
{
public function regions($regionName) {

$regions=Regions::find($regionName);




$googlemap=googlemap::where('regioninfo_id',$regionName)->get();




return view('regions')->with (['regions'=> $regions, 'googlemap' => $googlemap]);



}
}
Loading