fix: working copy, caching ASP, notworking orders though

This commit is contained in:
Didier Slof 2023-02-03 09:05:29 +01:00
parent dc5d204cfc
commit 390ad23e03
Signed by: didier
GPG key ID: 01E71F18AA4398E5
32 changed files with 246 additions and 194 deletions

View file

@ -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)]);
}
}

View file

@ -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');
}
}

View file

@ -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();
//
}
}

View file

@ -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);
}