Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Walter Felipe
submeta
Commits
6f1cfb86
Commit
6f1cfb86
authored
Oct 25, 2022
by
S-Nathalia
Browse files
cricao da tabela de cursos e intermedio de cursos com proponente
parent
282795a6
Changes
3
Show whitespace changes
Inline
Side-by-side
app/curso.php
0 → 100644
View file @
6f1cfb86
<?php
namespace
App
;
use
Illuminate\Database\Eloquent\Model
;
class
curso
extends
Model
{
//
}
database/migrations/2022_10_25_204029_create_cursos_table.php
0 → 100644
View file @
6f1cfb86
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
CreateCursosTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'cursos'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
string
(
'nome'
);
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'cursos'
);
}
}
database/migrations/2022_10_25_210227_create_proponentes_cursos_table.php
0 → 100644
View file @
6f1cfb86
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
CreateProponentesCursosTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'proponentes_cursos'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
integer
(
'curso_id'
);
$table
->
foreign
(
'curso_id'
)
->
references
(
'id'
)
->
on
(
'cursos'
);
$table
->
integer
(
'proponente_id'
);
$table
->
foreign
(
'proponente_id'
)
->
references
(
'id'
)
->
on
(
'proponentes'
);
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'proponentes_cursos'
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment