public static function store() { $params = $_POST; $attributes = array('name' => $params['name'], 'address' => $params['address'], 'postcode' => $params['postcode'], 'city' => $params['city'], 'phone' => $params['phone'], 'e_mail' => $params['e_mail']); $receiver = new receiver($attributes); $errors = $receiver->errors(); if (count($errors) == 0) { $receiver->save(); Redirect::to('/waybill/new', array('message' => 'Vastaanottaja on lisätty onnistuneesti!')); } else { View::make('receiver/new.html', array('errors' => $errors, 'attributes' => $attributes)); } }
</th> <th><?php echo $data["language_data"]["val102"]; ?> </th> <th><?php echo $data["language_data"]["val103"]; ?> </th> <th><?php echo $data["language_data"]["val81"]; ?> </th> </tr> <?php $receiver = new receiver(); foreach ($data["messages"] as $value) { $names = $receiver->names($c, $value["tousers"]); if ($value["attchment"] == 1) { $att = '<i class="fa fa-paperclip"></i>'; } else { $att = ' '; } ?> <tr> <td><?php echo $value["id"]; ?> </td> <td class="mailbox-subject">
<div class="mailbox-read-info"> <h5> <b><?php echo $data["language_data"]["val118"]; ?> </b>: <a href=""><?php echo $data["messages"][0]["fromusername"]; ?> </a> </h5> </div> <div class="mailbox-read-info"> <h5> <?php $receiver = new receiver(); $names = $receiver->names($c, $data["messages"][0]["tousers"]); ?> <b><?php echo $data["language_data"]["val116"]; ?> </b>: <a href=""><?php echo $names; ?> </a> </h5> </div> <!-- /.mailbox-controls --> <div class="mailbox-read-message"> <label><?php
public static function customers() { $customers = customer::all(); $receivers = receiver::all(); View::make('/waybill/new.html', array('customers' => $customers, 'receivers' => $receivers)); }
function get_interest() { return receiver::select('receiver_interest_product')->distinct()->orderBy('receiver_interest_product', 'ASC')->get(); }