- Preparing for open sourcing
This commit is contained in:
parent
798f63fafa
commit
543b6c8fdb
|
|
@ -11,9 +11,9 @@ define('APP_NAME', 'Attendize Event Ticketing');
|
|||
define('EVENT_DEFAULT_BG_COLOR', '#B23333');
|
||||
|
||||
/* paths */
|
||||
define('EVENT_IMAGES_PATH', 'user_content/event_images/'.date('my'));
|
||||
define('ORGANISER_IMAGES_PATH', 'user_content/organiser_images/'.date('my'));
|
||||
define('EVENT_PDF_TICKETS_PATH', 'user_content/pdf_tickets/'.date('my'));
|
||||
define('EVENT_IMAGES_PATH', 'user_content/event_images/');
|
||||
define('ORGANISER_IMAGES_PATH', 'user_content/organiser_images/');
|
||||
define('EVENT_PDF_TICKETS_PATH', 'user_content/pdf_tickets/');
|
||||
define('EVENT_BG_IMAGES', 'assets/images/public/EventPage/backgrounds');
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -111,7 +111,11 @@ class InstallerController extends Controller
|
|||
}
|
||||
Artisan::call('optimize', array('--force' => true));
|
||||
|
||||
return Redirect::route('signup',['first_run' => 'yup']);
|
||||
$fp = fopen(base_path()."/installed", 'w');
|
||||
fwrite($fp, '0.1.0');
|
||||
fclose($fp);
|
||||
|
||||
return Redirect::route('showSignup',['first_run' => 'yup']);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class OrganiserCustomizeController extends MyBaseController
|
|||
if (Input::hasFile('organiser_logo') ) {
|
||||
|
||||
$the_file = \File::get(Input::file('organiser_logo')->getRealPath());
|
||||
$file_name = '123-test-organiser_logo-' . $organiser->id . '.' . strtolower(Input::file('organiser_logo')->getClientOriginalExtension());
|
||||
$file_name = str_slug($organiser->name).'-logo-' . $organiser->id . '.' . strtolower(Input::file('organiser_logo')->getClientOriginalExtension());
|
||||
|
||||
$relative_path_to_file = ORGANISER_IMAGES_PATH . '/' . $file_name;
|
||||
$full_path_to_file = public_path().'/'.$relative_path_to_file;
|
||||
|
|
|
|||
|
|
@ -28,7 +28,8 @@ class Kernel extends HttpKernel {
|
|||
'auth' => 'App\Http\Middleware\Authenticate',
|
||||
'auth.basic' => 'Illuminate\Auth\Middleware\AuthenticateWithBasicAuth',
|
||||
'guest' => 'App\Http\Middleware\RedirectIfAuthenticated',
|
||||
'first.run' => 'App\Http\Middleware\FirstRunMiddleware'
|
||||
'first.run' => 'App\Http\Middleware\FirstRunMiddleware',
|
||||
'installed' => 'App\Http\Middleware\CheckInstalled'
|
||||
];
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
<?php namespace app\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Redirect;
|
||||
use Request;
|
||||
use App\Models\OrderStatus;
|
||||
use App\Attendize\Utils;
|
||||
|
||||
class CheckInstalled
|
||||
{
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
if(!file_exists(base_path('installed')) && !Utils::isAttendize()) {
|
||||
return Redirect::to('install');
|
||||
}
|
||||
|
||||
$response = $next($request);
|
||||
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
|
|
@ -9,6 +9,7 @@ use Input;
|
|||
use Redirect;
|
||||
use Cache;
|
||||
use Session;
|
||||
use File;
|
||||
use App\Models\Organiser;
|
||||
|
||||
class FirstRunMiddleware
|
||||
|
|
|
|||
|
|
@ -33,62 +33,69 @@ Route::any('payment/return/stripe', [
|
|||
]);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Login
|
||||
*/
|
||||
Route::get('/login', [
|
||||
'as' => 'login',
|
||||
'uses' => 'UserLoginController@showLogin'
|
||||
]);
|
||||
Route::post('/login', 'UserLoginController@postLogin');
|
||||
|
||||
/*
|
||||
* Forgot password
|
||||
*/
|
||||
Route::get('login/forgot-password', [
|
||||
'as' => 'forgotPassword',
|
||||
'uses' => 'RemindersController@getRemind'
|
||||
]);
|
||||
|
||||
Route::post('login/forgot-password', [
|
||||
'as' => 'postForgotPassword',
|
||||
'uses' => 'RemindersController@postRemind'
|
||||
]);
|
||||
|
||||
/*
|
||||
* Reset Password
|
||||
*/
|
||||
Route::get('login/reset-password/{token}', [
|
||||
'as' => 'showResetPassword',
|
||||
'uses' => 'RemindersController@getReset'
|
||||
]);
|
||||
|
||||
Route::post('login/reset-password', [
|
||||
'as' => 'postResetPassword',
|
||||
'uses' => 'RemindersController@postReset'
|
||||
]);
|
||||
|
||||
|
||||
/*
|
||||
* Logout
|
||||
*/
|
||||
Route::any('/logout', 'UserLogoutController@doLogout');
|
||||
|
||||
|
||||
/*
|
||||
* Registration / Account creation
|
||||
*/
|
||||
Route::get('/signup', 'UserSignupController@showSignup');
|
||||
Route::post('/signup', 'UserSignupController@postSignup');
|
||||
Route::group(array('middleware' => ['installed']), function() {
|
||||
|
||||
/*
|
||||
* Confirm Email
|
||||
*/
|
||||
Route::get('signup/confirm_email/{confirmation_code}', [
|
||||
'as' => 'confirmEmail',
|
||||
'uses' => 'UserSignupController@confirmEmail'
|
||||
]);
|
||||
|
||||
/*
|
||||
* Login
|
||||
*/
|
||||
Route::get('/login', [
|
||||
'as' => 'login',
|
||||
'uses' => 'UserLoginController@showLogin'
|
||||
]);
|
||||
Route::post('/login', 'UserLoginController@postLogin');
|
||||
|
||||
/*
|
||||
* Forgot password
|
||||
*/
|
||||
Route::get('login/forgot-password', [
|
||||
'as' => 'forgotPassword',
|
||||
'uses' => 'RemindersController@getRemind'
|
||||
]);
|
||||
|
||||
Route::post('login/forgot-password', [
|
||||
'as' => 'postForgotPassword',
|
||||
'uses' => 'RemindersController@postRemind'
|
||||
]);
|
||||
|
||||
/*
|
||||
* Reset Password
|
||||
*/
|
||||
Route::get('login/reset-password/{token}', [
|
||||
'as' => 'showResetPassword',
|
||||
'uses' => 'RemindersController@getReset'
|
||||
]);
|
||||
|
||||
Route::post('login/reset-password', [
|
||||
'as' => 'postResetPassword',
|
||||
'uses' => 'RemindersController@postReset'
|
||||
]);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Registration / Account creation
|
||||
*/
|
||||
Route::get('/signup', [
|
||||
'uses' => 'UserSignupController@showSignup',
|
||||
'as' => 'showSignup'
|
||||
]);
|
||||
Route::post('/signup', 'UserSignupController@postSignup');
|
||||
|
||||
/*
|
||||
* Confirm Email
|
||||
*/
|
||||
Route::get('signup/confirm_email/{confirmation_code}', [
|
||||
'as' => 'confirmEmail',
|
||||
'uses' => 'UserSignupController@confirmEmail'
|
||||
]);
|
||||
});
|
||||
|
||||
/*
|
||||
* Public organiser page routes
|
||||
|
|
@ -172,10 +179,6 @@ Route::get('order/{order_reference}/tickets', [
|
|||
* Begin logged in stuff
|
||||
*/
|
||||
Route::group(array('middleware' => ['auth', 'first.run']), function() {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Edit User
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
|
|||
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
|
||||
class User extends Model implements AuthenticatableContract, CanResetPasswordContract {
|
||||
|
||||
use Authenticatable, CanResetPassword, SoftDeletes;
|
||||
|
|
|
|||
|
|
@ -4,13 +4,9 @@
|
|||
"keywords": ["event management", "ticket selling", "tickets", "events"],
|
||||
"license": "Attribution Assurance License",
|
||||
"type": "project",
|
||||
"authors": {
|
||||
"name" : "Dave Earley",
|
||||
"email": "dave@attendize.com"
|
||||
},
|
||||
"homepage" : "https://www.attendize.com",
|
||||
"require": {
|
||||
"laravel/framework": "5.1.*",
|
||||
"laravel/framework": "5.1.0",
|
||||
"illuminate/html": "~5.0",
|
||||
"milon/barcode": "dev-master",
|
||||
"stripe/stripe-php": "1.*",
|
||||
|
|
@ -22,7 +18,6 @@
|
|||
"laravel/socialite": "~2.0",
|
||||
"filp/whoops": "~1.0",
|
||||
"vinelab/http": "dev-master",
|
||||
"barryvdh/laravel-debugbar": "~2.0",
|
||||
"mews/purifier": "~2.0",
|
||||
"league/flysystem-aws-s3-v3" : "~1.0",
|
||||
"maxhoffmann/parsedown-laravel": "dev-master"
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ return [
|
|||
*/
|
||||
|
||||
'password' => [
|
||||
'email' => 'emails.Auth.Reminder',
|
||||
'email' => 'Emails.Auth.Reminder',
|
||||
'table' => 'password_resets',
|
||||
'expire' => 60,
|
||||
],
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ class CreateUsersTable extends Migration {
|
|||
$t->decimal('sales_volume', 13, 2);
|
||||
$t->decimal('organiser_fees_volume', 13, 2);
|
||||
$t->decimal('organiser_fee_fixed', 13, 2)->default(0);
|
||||
$t->decimal('organiser_fees_percentage', 4, 3)->default(0);
|
||||
$t->decimal('organiser_fee_percentage', 4, 3)->default(0);
|
||||
$t->unsignedInteger('organiser_id');
|
||||
$t->foreign('organiser_id')->references('id')->on('organisers');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue