Public Access
first commit
This commit is contained in:
commit
fcae679714
75 files changed
+12701
No files matched your search
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class BandsController extends Controller
|
||||
{
|
||||
public function index() {
|
||||
return view('bands',['bandname' => 'Band1', 'genre' => 'Rock']);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
abstract class Controller
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class bands extends Controller
|
||||
{
|
||||
public function index() {
|
||||
return view('bands',['bandname' => 'Band1', 'genre' => 'Rock']);
|
||||
}
|
||||
|
||||
public function create_bewerbung(){
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class bewerbung extends Controller
|
||||
{
|
||||
public function store(Request $request)
|
||||
{
|
||||
$data = $request->validate([
|
||||
'name' => ['required','string','max:255'],
|
||||
'text' => ['required','string','max:5000'],
|
||||
'pic' => ['nullable','image','mimes:jpg,jpeg,png','max:4096'],
|
||||
'bedingungen' => ['nullable','file','mimetypes:application/pdf','max:8192'],
|
||||
'active' => ['sometimes','accepted'],
|
||||
'time' => ['sometimes','accepted'],
|
||||
'sdate' => ['nullable','date'],
|
||||
'edate' => ['nullable','date','after_or_equal:sdate'],
|
||||
'stime' => ['nullable','date_format:H:i'],
|
||||
'etime' => ['nullable','date_format:H:i'],
|
||||
]);
|
||||
|
||||
if ($request->hasFile('pic')) {
|
||||
$data['pic_path'] = $request->file('pic')->store('bewerbungen/pics', 'public');
|
||||
}
|
||||
if ($request->hasFile('bedingungen')) {
|
||||
$data['bedingungen_path'] = $request->file('bedingungen')->store('bewerbungen/bedingungen', 'public');
|
||||
}
|
||||
|
||||
$data['active'] = $request->boolean('active');
|
||||
$data['time'] = $request->boolean('time');
|
||||
|
||||
// TODO: $bewerbung = Bewerbung::create($data);
|
||||
|
||||
return redirect()->back()->with('success', 'Bewerbung gespeichert.');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Bands extends Model
|
||||
{
|
||||
protected $table = '';//
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
// use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
|
||||
class User extends Authenticatable
|
||||
{
|
||||
/** @use HasFactory<\Database\Factories\UserFactory> */
|
||||
use HasFactory, Notifiable;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var list<string>
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'email',
|
||||
'password',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be hidden for serialization.
|
||||
*
|
||||
* @var list<string>
|
||||
*/
|
||||
protected $hidden = [
|
||||
'password',
|
||||
'remember_token',
|
||||
];
|
||||
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'email_verified_at' => 'datetime',
|
||||
'password' => 'hashed',
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Register any application services.
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user