fix: working copy, caching ASP, notworking orders though
This commit is contained in:
parent
dc5d204cfc
commit
390ad23e03
32 changed files with 246 additions and 194 deletions
|
@ -19,6 +19,10 @@ class ShowingController extends Controller
|
|||
|
||||
public function order($id)
|
||||
{
|
||||
// if not authenticated piss off
|
||||
if (!auth()->check()) {
|
||||
return redirect()->route('login');
|
||||
}
|
||||
return view('main.order', ['title' => "Order Tickets", 'showing' => \App\Models\Showing::findOrfail($id)]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -104,4 +104,9 @@ class User extends Authenticatable
|
|||
return $this->hasMany('App\Models\Order', 'user_id', 'user_id');
|
||||
}
|
||||
|
||||
public function address()
|
||||
{
|
||||
return $this->hasOne('App\Models\Address', 'address_id', 'address_id');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
|
||||
namespace App\Providers;
|
||||
|
||||
// use Illuminate\Support\Facades\Gate;
|
||||
use Laravel\Passport\Passport;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
||||
|
||||
class AuthServiceProvider extends ServiceProvider
|
||||
|
@ -24,7 +25,5 @@ class AuthServiceProvider extends ServiceProvider
|
|||
public function boot()
|
||||
{
|
||||
$this->registerPolicies();
|
||||
|
||||
//
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ class CacheImage extends Component
|
|||
{
|
||||
if (!\Cache::has($this->src)) {
|
||||
$image = file_get_contents($this->src);
|
||||
\Cache::put($this->src, $image, 60 * 24 * 7);
|
||||
\Cache::put($this->src, $image, 60 * 24 * 7); // 1 week
|
||||
}
|
||||
return \Cache::get($this->src);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue