+
+ diff --git a/app/Http/Controllers/PublicController.php b/app/Http/Controllers/PublicController.php
new file mode 100644
index 00000000..40bd6b79
--- /dev/null
+++ b/app/Http/Controllers/PublicController.php
@@ -0,0 +1,42 @@
+data = ['categories'=>Category::pluck(trans('Category.category_title'),'id'),
+ 'category_id'=>''];
+ }
+
+ public function showHomePage(){
+ $events = Event::where('end_date', '>', Carbon::now())
+ ->take(10)
+ ->get();
+ $this->data['events'] = $events;
+ return view('Public.HomePage', $this->data);
+ }
+
+ public function showCategoryEvents($category_id){
+ $events = Event::where('end_date', '>', Carbon::now())
+ ->where('category_id',$category_id)
+ ->take(10)
+ ->get();
+ $this->data['events'] = $events;
+ $this->data['category_id']= $category_id;
+// print_r($this->data);
+ return view('Public.CategoryEventsPage', $this->data);
+ }
+}
\ No newline at end of file
diff --git a/app/Http/routes.php b/app/Http/routes.php
index 62a377bc..b0a6923e 100644
--- a/app/Http/routes.php
+++ b/app/Http/routes.php
@@ -120,6 +120,15 @@ Route::group(
/*
* Public event page routes
*/
+ Route::group(['prefix' => 'category'], function () {
+ /**
+ * Events by category
+ */
+ Route::get('/{category_id}', [
+ 'as' => 'showCategoryEventsPage',
+ 'uses' => 'PublicController@showCategoryEvents',
+ ]);
+ });
Route::group(['prefix' => 'e'], function () {
/*
@@ -694,12 +703,12 @@ Route::group(
]);
});
});
-
- Route::get('/', function () {
- return Redirect::route('showSelectOrganiser');
- // I prefer it that way:
- // return Redirect::route('showOrganiserHome', ["organiser_id"=>1]);
- });
+ Route::get('/','PublicController@showHomePage');
+// Route::get('/', function () {
+// return Redirect::route('showSelectOrganiser');
+// // I prefer it that way:
+// // return Redirect::route('showOrganiserHome', ["organiser_id"=>1]);
+// });
Route::get('/terms_and_conditions', [
'as' => 'termsAndConditions',
diff --git a/composer.json b/composer.json
index d388108c..f234cd07 100755
--- a/composer.json
+++ b/composer.json
@@ -20,24 +20,27 @@
"illuminate/support": "~5.6",
"intervention/image": "~2.4",
"laracasts/utilities": "~2.1",
- "laravel/framework": "~5.6",
- "laravel/socialite": "~3.0",
"laravelcollective/html": "~5.6",
"league/flysystem-aws-s3-v3": "~1.0",
"maatwebsite/excel": "~2.1",
"maxhoffmann/parsedown-laravel": "dev-master",
- "mcamara/laravel-localization": "~1.2",
- "mews/purifier": "~2.0",
"milon/barcode": "~5.3",
- "nitmedia/wkhtml2pdf": "dev-master",
- "omnipay/common": "~3",
- "omnipay/dummy": "~3",
- "omnipay/paypal": "~3",
- "omnipay/stripe": "~3",
"php-http/curl-client": "^1.7",
"php-http/message": "^1.6",
"predis/predis": "~1.1",
- "vinelab/http": "~1.5"
+ "vinelab/http": "~1.5",
+ "laravel/framework": "~5.6",
+ "mcamara/laravel-localization": "~1.2",
+ "mews/purifier": "~2.0",
+ "nitmedia/wkhtml2pdf": "dev-master",
+
+ "laravel/socialite": "~3.0",
+ "omnipay/common": "~3",
+ "omnipay/dummy": "~3",
+ "omnipay/paypal": "~3",
+ "omnipay/stripe": "~3"
+
+
},
"require-dev": {
"phpunit/phpunit": "7.3.*",
diff --git a/resources/views/Public/CategoryEventsPage.blade.php b/resources/views/Public/CategoryEventsPage.blade.php
new file mode 100644
index 00000000..66d14520
--- /dev/null
+++ b/resources/views/Public/CategoryEventsPage.blade.php
@@ -0,0 +1,14 @@
+@extends('Public.Layouts.HomePageLayout')
+@section('head')
+
+@stop
+@section('content')
+ @include('Public.Partials.PublicHeader')
+
+ @include('Public.Partials.PublicContent')
+
+ @include('Public.Partials.PublicFooter')
+@stop
+@section('foot')
+
+@stop
\ No newline at end of file
diff --git a/resources/views/Public/HomePage.blade.php b/resources/views/Public/HomePage.blade.php
new file mode 100644
index 00000000..d9c86b72
--- /dev/null
+++ b/resources/views/Public/HomePage.blade.php
@@ -0,0 +1,311 @@
+@extends('Public.Layouts.HomePageLayout')
+@section('head')
+ {!!HTML::style('assets/out/revolution-slider/revolution/css/layers.css')!!}
+ {!!HTML::style('assets/out/revolution-slider/revolution/css/settings.css')!!}
+ {!!HTML::style('assets/out/revolution-slider/revolution/css/navigation.css')!!}
+ {!!HTML::style('assets/out/icon-material/material-icons.css')!!}
+
+@stop
+@section('content')
+ @include('Public.Partials.PublicHeader')
+
+
+
+